The R Project SVN R

Rev

Rev 59039 | Rev 68948 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 59039 Rev 61433
Line 31... Line 31...
31
}
31
}
32
 
32
 
33
\details{
33
\details{
34
  \code{type = "none"} passes the input through unchanged, but may be
34
  \code{type = "none"} passes the input through unchanged, but may be
35
  useful if \code{type} is a variable.
35
  useful if \code{type} is a variable.
36
  
36
 
37
  \code{type = "unknown"} attempts to detect the type of compression
37
  \code{type = "unknown"} attempts to detect the type of compression
38
  applied (if any): this will always succeed for \command{bzip2}
38
  applied (if any): this will always succeed for \command{bzip2}
39
  compression, and will succeed for other forms if there is a suitable
39
  compression, and will succeed for other forms if there is a suitable
40
  header.  It will auto-detect the \sQuote{magic} header
40
  header.  It will auto-detect the \sQuote{magic} header
41
  (\code{"\x1f\x8b"}) added to files by the \command{gzip} program (and
41
  (\code{"\x1f\x8b"}) added to files by the \command{gzip} program (and
Line 48... Line 48...
48
  file with \command{xz -9e} (including adding the \sQuote{magic}
48
  file with \command{xz -9e} (including adding the \sQuote{magic}
49
  header): decompression should cope with the contents of any file
49
  header): decompression should cope with the contents of any file
50
  compressed with \command{xz} version 4.999 and some versions of
50
  compressed with \command{xz} version 4.999 and some versions of
51
  \command{lzma}.  There are other versions, in particular \sQuote{raw}
51
  \command{lzma}.  There are other versions, in particular \sQuote{raw}
52
  streams, that are not currently handled.
52
  streams, that are not currently handled.
53
  
53
 
54
  All the types of compression can expand the input: for \code{"gzip"}
54
  All the types of compression can expand the input: for \code{"gzip"}
55
  and \code{"bzip"} the maximum expansion is known and so
55
  and \code{"bzip"} the maximum expansion is known and so
56
  \code{memCompress} can always allocate sufficient space.  For
56
  \code{memCompress} can always allocate sufficient space.  For
57
  \code{"xz"} it is possible (but extremely unlikely) that compression
57
  \code{"xz"} it is possible (but extremely unlikely) that compression
58
  will fail if the output would have been too large.
58
  will fail if the output would have been too large.
Line 62... Line 62...
62
  A raw vector or a character string (if \code{asChar = TRUE}).
62
  A raw vector or a character string (if \code{asChar = TRUE}).
63
}
63
}
64
 
64
 
65
\seealso{
65
\seealso{
66
  \link{connections}.
66
  \link{connections}.
67
  
67
 
68
  \url{http://en.wikipedia.org/wiki/Data_compression} for background on
68
  \url{http://en.wikipedia.org/wiki/Data_compression} for background on
69
  data compression, \url{http://zlib.net/},
69
  data compression, \url{http://zlib.net/},
70
  \url{http://en.wikipedia.org/wiki/Gzip}, \url{http://www.bzip.org/},
70
  \url{http://en.wikipedia.org/wiki/Gzip}, \url{http://www.bzip.org/},
71
  \url{http://en.wikipedia.org/wiki/Bzip2}, \url{http://tukaani.org/xz/}
71
  \url{http://en.wikipedia.org/wiki/Bzip2}, \url{http://tukaani.org/xz/}
72
  and \url{http://en.wikipedia.org/wiki/Xz} for references about the
72
  and \url{http://en.wikipedia.org/wiki/Xz} for references about the