Index

Package: Huffman

Description

private package UnZip.Decompress.Huffman is
UnZip.Decompress.Huffman ------------------------- Huffman tree generation and deletion. Originally from info-zip's unzip, data structure rewritten by G. de Montmollin

Types

HufT_table

type HufT_table;

p_HufT_table

type p_HufT_table is access HufT_table;

HufT

type HufT is record
    extra_bits : Natural;
    bits       : Natural;
    n          : Natural;
    next_table : p_HufT_table;
  end record;

p_HufT

type p_HufT is access all HufT;

p_Table_list

type p_Table_list is access Table_list;

Length_array

type Length_array is array(Integer range <>) of Natural;

Constants & Global variables

invalid

invalid: constant:= 99;

empty (Length_array)

empty : constant Length_array( 1..0 ):= ( others=> 0 );

huft_error

huft_error,                    -- bad tree constructed
  huft_out_of_memory: exception;
Possible exceptions occuring in huft_build

huft_out_of_memory

huft_out_of_memory: exception;
bad tree constructed

Subprograms & Entries

HufT_free

procedure HufT_free 
( tl: in out p_Table_list );
Free huffman tables starting with table where t points to

HufT_build

procedure HufT_build 
( b: Length_array;
s: Integer;
d, e: Length_array;
tl: out p_Table_list;
m: in out Integer;
huft_incomplete: out Boolean);
Build huffman table from code lengths given by array b.all