The Flate module implements an efficient lossless compression/decompression algorithm suitable for text and data. It is a Ruby-wrapper around code from the 'zlib' compression library, written by Jean-loup Gailly and Mark Adler, who kindly grant permission for free use of their work (visit the zlib site). The algorithm for flate is based on huffman encoding and LZ77 compression. For an introduction to the details, see the description by Gailly and Adler. Compression to 1/3 original size is not unusual for text files, which explains the popularity of this algorithm and its use in applications such as 'Zip' and 'gzip', and in PDF files where it is used for lossless compression of text along with JPEG for lossy compression of images. Note that short strings, fewer than 100 bytes or so, may actually 'compress' to a larger string due to the overhead of compression tables.