Index

Package: Compress

Description

package Zip.Compress is
Zip.Compress ------------- Created 9-Dec-2007 This package facilitates the storage or compression of data. Note that unlike decompression where the decoding is unique, there are an undefinite number of ways of compressing data into formats which include compression structures, like Deflate. As a result, you may want to use your own way (e.g. interfacing with zlib). This package is only a portable one, and doesn't claim to be the best or the fastest

Types

Compression_Method

type Compression_Method is
    (Store,
     Shrink,
     Reduce_1, Reduce_2, Reduce_3, Reduce_4,
     Deflate_Fixed  -- compress the data in one block with
                    -- predefined compression structures.
    );

Reduction_Method

subtype Reduction_Method is Compression_Method range Reduce_1 .. Reduce_4;

Deflation_Method

subtype Deflation_Method is Compression_Method range
    Deflate_Fixed .. Deflate_Fixed;

Constants & Global variables

User_abort

User_abort: exception;

Subprograms & Entries

Compress_data

procedure Compress_data
( input, output: Zip_Streams.Zipstream_Class;
input_size_known: Boolean;
input_size: File_size_type;
-- ignored if unknown method: Compression_Method;
feedback: Feedback_proc;
CRC: out Interfaces.Unsigned_32;
output_size: out File_size_type;
zip_type: out Interfaces.Unsigned_16 -- ^ code corresponding to the compression method actually used );