{"size": 844, "ext": "scrbl", "max_stars_repo_path": "snappy/snappy.scrbl", "max_stars_repo_name": "stchang/snappy", "max_stars_repo_stars_event_min_datetime": "2015-11-20T09:57:30.000Z", "max_stars_repo_stars_event_max_datetime": "2020-01-06T17:16:24.000Z", "max_issues_repo_path": "snappy/snappy.scrbl", "max_issues_repo_name": "stchang/snappy", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "snappy/snappy.scrbl", "max_forks_repo_name": "stchang/snappy", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.375, "max_line_length": 79, "alphanum_fraction": 0.7239336493}
#lang scribble/manual

@(require (for-label racket/base
                     racket/contract
                     snappy))

@title{Snappy: FFI bindings for fast compression}

@section{Introduction}

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

@defmodule[snappy]

@defproc[(compress [input bytes?]) bytes?]{
  Compresses the input bytestring and returns the
  resulting bytestring.
}

@defproc[(uncompress [input (and/c bytes? valid-compression?)]) bytes?]{
  Uncompresses the input bytestring and returns the
  resulting bytestring.
}

@defproc[(valid-compression? [input bytes?]) boolean?]{
  Returns @racket[#t] if @racket[input] is a compressed
  bytestring that can be uncompressed with Snappy.
  Otherwise returns @racket[#f].
}

