Snappy is a fast compression library written by google and widely used in distributed systems.
This package provides bindings to the standard snappy implementation.
1 2 3 4 5 6 7
A character vector (of length 1) to compress with snappy.
A raw vector (RAWSXP) to compress or decompress with snappy.
These binding contain the snappy C++ code and necessary R wrappers, so there is no need to install or link to a snappy dynamic library (so or dll file) in order to use this package.
Furthermore, these binding work at the level or raw bytes, not
character vectors, which is more robust and should be faster.
decompress_raw when working
with anything other than text.
decompress provide wrappers
which convert R character vectors into the
type needed by the underlying engine.
compress returns the raw snappy encoded bytes of
the text input.
compress_raw returns the raw snappy encoded bytes
of the raw input.
decompress returns the a character vector made
from the decoded bytes of its input. If this coercion
can't be performed (i.e., the bytes can't be represented
as a string) an error will be thrown.
decompress_raw returns the a raw bytes decoded from
its input. When passed bytes which are not snappy
compressed, this function will return NULL.
1 2 3 4 5 6 7 8 9
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.