Description Usage Arguments Value Author(s) References See Also Examples
This uses the standard zlib algorithm/format for compressing the input into a buffer that can be passed to other computations.
This does not use the same algorithm or format that the
shell tool compress
uses, i.e. LZW (Lempel-Ziv-Welch).
1 |
str |
the text to be compressed |
size |
the size for a working buffer that zlib uses during the compression. |
level |
the level of compression. This is a number between 0 and 9. 9 means highly compressed, 0 means no compression at all. The trade-off is computational intensity: the greater the compression, the greater the time spent performing the compression. |
A “raw” vector containing the compressed contents.
Duncan Temple Lang
zlib and bzip2
1 2 3 | x = "A string to compress"
g = compress(x)
uncompress(g) == x
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.