[][src]Module rscache::codec

Provides two functions to encode/decode buffers.

Includes compression and decompression.

NOTE: decoding only works on buffers that are fetched from the cache. It cannot decode buffers that were encoded using the encode() function.

Enums

Compression

Compression types that are supported by the encode and decode functions.

Functions

decode

Decodes a buffer. The buffer needs to have the Read trait implemented.

encode

Encodes a buffer, with the selected Compression format. Revision is an optional argument that encodes the version of this buffer into it, if no revision should be encoded pass None.