Snappy:   FFI bindings for fast compression
1 Introduction
compress
uncompress
valid-compression?
7.1

Snappy: FFI bindings for fast compression

1 Introduction

This is an FFI binding for the Snappy library from Google. Snappy provides very fast compression and decompression, though with large compressed sizes.

 (require snappy) package: snappy

procedure

(compress input)  bytes?

  input : bytes?
Compresses the input bytestring and returns the resulting bytestring.

procedure

(uncompress input)  bytes?

  input : (and/c bytes? valid-compression?)
Uncompresses the input bytestring and returns the resulting bytestring.

procedure

(valid-compression? input)  boolean?

  input : bytes?
Returns #t if input is a compressed bytestring that can be uncompressed with Snappy. Otherwise returns #f.