unit deflatepvt;

interface

const
  DEFLATEMAXLENGTHLENGTHCODES = 19 ;
  DEFLATEMAXLENGTHCODES = 286 ;
  DEFLATEMAXDISTANCECODES = 30 ;
  DEFLATEMAXNUMBEROFHUFFMANCODES = DEFLATEMAXLENGTHCODES ;
  DEFLATEFIRSTLENGTHCODE = 257 ;
  DEFLATELENGTHCODECOUNT = DEFLATEMAXLENGTHCODES
                                          - DEFLATEFIRSTLENGTHCODE ;
  DEFLATELITERALCOUNT = 256 ;
  DEFLATEENDCODE = DEFLATELITERALCOUNT ;

// Maximum Huffman Code Sizes
  DEFLATEMAXLENGTHLENGTHCODESIZE = 7 ;
  DEFLATEMAXDISTANCECODESIZE = 15 ;
  DEFLATEMAXLENGTHCODESIZE = 15 ;

  DEFLATEWINDOWSIZE = (1 Shl 15) ;
  DEFLATEWINDOWMASK = DEFLATEWINDOWSIZE - 1 ;
  DEFLATELONGESTLENGTH = 258 ;

  DEFLATELENGTHORDER  : Array [0..DEFLATEMAXLENGTHLENGTHCODES - 1] of Byte =
    (
  16, 17, 18, 0,  8, 7,  9, 6, 10, 5,
  11,  4, 12, 3, 13, 2, 14, 1, 15 
    ) ;

Type
  TDeflateLength = 0..DEFLATELONGESTLENGTH ;
implementation

end.
