Index

File: zip-compress-reduce.ads

Description

Subprograms & Entries

Reduce

procedure Zip.Compress.Reduce
( input, output: Zip_Streams.Zipstream_Class;
input_size_known: Boolean;
input_size: File_size_type;
-- ignored if unknown feedback: Feedback_proc;
reduction_factor: Positive;
CRC: in out Interfaces.Unsigned_32;
-- only updated here output_size: out File_size_type;
compression_ok: out Boolean -- indicates compressed <= uncompressed);

References:

zip-compress-reduce.ads:17:32 (declaration)
zip-compress-reduce.adb:11:24 (body)
zip-compress-reduce.adb:599:18 (label)
zip-compress.adb:24:19 (with line)
zip-compress.adb:117:22 (reference)

Calls:

Zip.Compress.Reduce.Build_Followers defined at zip-compress-reduce.adb:237:13
Zip.Compress.Reduce.Build_stats defined at zip-compress-reduce.adb:574:13
Zip.Compress.Reduce.Compress defined at zip-compress-reduce.adb:575:13
Zip.Compress.Reduce.Encode defined at zip-compress-reduce.adb:387:13
Zip.Compress.Reduce.Flush_output defined at zip-compress-reduce.adb:116:13
Zip.Compress.Reduce.Put_byte defined at zip-compress-reduce.adb:98:13
Zip.Compress.Reduce.Put_code defined at zip-compress-reduce.adb:126:13
Zip.Compress.Reduce.Read_Block defined at zip-compress-reduce.adb:68:13
Zip.Compress.Reduce.Save_Followers defined at zip-compress-reduce.adb:163:13
Zip.Compress.Reduce.Show_partial_markov defined at zip-compress-reduce.adb:205:13
Zip.Compress.Reduce.Show_symbol defined at zip-compress-reduce.adb:154:13
Zip.Compress.Reduce.Write_Block defined at zip-compress-reduce.adb:83:13
Zip_Streams.Index defined at zip_streams.ads:44:13
Zip_Streams.Set_Index defined at zip_streams.ads:40:14
Just for fun, playing with the old Zip Reduce format... Reduce combines LZ77 with a probabilistic using a Markov chain. The format has a single block for the whole file :-(. NB: this compressor works in two passes, the first one serving to compute the exact Markov matrix for the whole data to be compressed. Hence, it is slow. However, we cache the last n=LZ_cache_size bytes compressed by LZ77. The result is optimal - within the constraints of that format: one block, poor encoding of compressed data and of the compression structure (the Markov matrix). Author: G. de Montmollin, January 2009