UltraScan III
Namespaces | Macros | Variables
us_gzip.cpp File Reference
#include <QFileInfo>
#include <QDataStream>
#include <QDateTime>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <fcntl.h>
#include <utime.h>
#include <sys/stat.h>
#include <iostream>
#include "us_gzip.h"
Include dependency graph for us_gzip.cpp:

Go to the source code of this file.

Namespaces

namespace  gzip_data
 

Macros

#define O_BINARY   0
 
#define wp   outcnt
 
#define GETBYTE()   (inptr < insize ? inbuf[inptr++] : (wp = w, fill_inbuf(0)))
 
#define flush_output(w)   (wp=(w),flush_window())
 
#define put_byte(c)
 
#define put_short(w)
 
#define put_long(n)
 
#define GZIP_MAGIC   "\037\213" /* Magic header for gzip files, 1F 8B */
 
#define DEFLATED   8
 
#define ORIG_NAME   0x08 /* bit 3 set: original file name present */
 
#define SLOW   2
 
#define OS_CODE   0x03
 
#define slide   window
 
#define NEXTBYTE()   (uch)GETBYTE()
 
#define NEEDBITS(n)   {while(k<(n)){b|=((ulg)NEXTBYTE())<<k;k+=8;}}
 
#define DUMPBITS(n)   {b>>=(n);k-=(n);}
 
#define lbits   9
 
#define dbits   6
 
#define BMAX   16 /* maximum bit length of any code (16 for explode) */
 
#define N_MAX   288 /* maximum number of codes in any set */
 
#define memzero(s, n)   bzero((s), (n))
 
#define PATH_SEP   '/'
 
#define HASH_BITS   15
 
#define MIN_LOOKAHEAD   ( MAX_MATCH + MIN_MATCH + 1 )
 
#define MAX_DIST   ( WSIZE - MIN_LOOKAHEAD )
 
#define HASH_SIZE   (unsigned) ( 1 << HASH_BITS )
 
#define HASH_MASK   ( HASH_SIZE - 1 )
 
#define WMASK   ( WSIZE - 1 )
 
#define H_SHIFT   ( (HASH_BITS + MIN_MATCH - 1) / MIN_MATCH )
 
#define UPDATE_HASH(h, c)   ( h = ( ( (h) << H_SHIFT ) ^ (c)) & HASH_MASK )
 
#define INSERT_STRING(s, match_head)
 
#define FLUSH_BLOCK(eof)
 
#define TOO_FAR   4096
 
#define pack_level   9
 
#define d_code(dist)   ( (dist) < 256 ? dist_code[ dist ] : dist_code[ 256 + ( ( dist ) >> 7 ) ] )
 
#define STORED_BLOCK   0
 
#define STORED   STORED_BLOCK
 
#define STATIC_TREES   1
 
#define DYN_TREES   2
 
#define level   9
 
#define seekable()   0 /* force sequential output */
 
#define send_code(c, tree)   send_bits( tree[ c ].Code, tree[ c ].Len )
 
#define l_buf   inbuf
 
#define SMALLEST   1
 
#define pqremove(tree, top)
 
#define MAX(a, b)   ( a >= b ? a : b )
 
#define smaller(tree, n, m)
 
#define REP_3_6   16
 
#define REPZ_3_10   17
 
#define REPZ_11_138   18
 

Variables

ulg gzip_data::crc_32_tab []
 
unsigned gzip_data::border []
 
ush gzip_data::cplens []
 
ush gzip_data::cplext []
 
ush gzip_data::cpdist []
 
ush gzip_data::cpdext []
 
ush gzip_data::mask_bits []
 
US_Gzip::config gzip_data::configuration_table []
 
int gzip_data::extra_lbits []
 
int gzip_data::extra_dbits []
 
int gzip_data::extra_blbits []
 
unsigned char gzip_data::bl_order []
 

Macro Definition Documentation

#define BMAX   16 /* maximum bit length of any code (16 for explode) */

Definition at line 806 of file us_gzip.cpp.

#define d_code (   dist)    ( (dist) < 256 ? dist_code[ dist ] : dist_code[ 256 + ( ( dist ) >> 7 ) ] )

Definition at line 2207 of file us_gzip.cpp.

#define dbits   6

Definition at line 803 of file us_gzip.cpp.

#define DEFLATED   8
#define DUMPBITS (   n)    {b>>=(n);k-=(n);}

Definition at line 755 of file us_gzip.cpp.

#define DYN_TREES   2

Definition at line 2216 of file us_gzip.cpp.

#define FLUSH_BLOCK (   eof)
Value:
flush_block( block_start >= 0L ? (char*) &window[ (unsigned) block_start ] : \
(char*) NULL, (long) strstart - block_start, (eof) )

Definition at line 1759 of file us_gzip.cpp.

#define flush_output (   w)    (wp=(w),flush_window())
#define GETBYTE ( )    (inptr < insize ? inbuf[inptr++] : (wp = w, fill_inbuf(0)))
#define GZIP_MAGIC   "\037\213" /* Magic header for gzip files, 1F 8B */
#define H_SHIFT   ( (HASH_BITS + MIN_MATCH - 1) / MIN_MATCH )

Definition at line 1726 of file us_gzip.cpp.

#define HASH_BITS   15

Definition at line 1708 of file us_gzip.cpp.

#define HASH_MASK   ( HASH_SIZE - 1 )

Definition at line 1720 of file us_gzip.cpp.

#define HASH_SIZE   (unsigned) ( 1 << HASH_BITS )

Definition at line 1719 of file us_gzip.cpp.

#define INSERT_STRING (   s,
  match_head 
)
Value:
( UPDATE_HASH( ins_h, window[ (s) + MIN_MATCH - 1 ] ), \
prev[ (s) & WMASK ] = match_head = head[ ins_h ], \
head[ ins_h ] = (s) )

Definition at line 1750 of file us_gzip.cpp.

#define l_buf   inbuf

Definition at line 2520 of file us_gzip.cpp.

#define lbits   9

Definition at line 801 of file us_gzip.cpp.

#define level   9
#define MAX (   a,
 
)    ( a >= b ? a : b )

Definition at line 2683 of file us_gzip.cpp.

#define MAX_DIST   ( WSIZE - MIN_LOOKAHEAD )

Definition at line 1715 of file us_gzip.cpp.

#define memzero (   s,
 
)    bzero((s), (n))

Definition at line 812 of file us_gzip.cpp.

#define MIN_LOOKAHEAD   ( MAX_MATCH + MIN_MATCH + 1 )

Definition at line 1711 of file us_gzip.cpp.

#define N_MAX   288 /* maximum number of codes in any set */

Definition at line 807 of file us_gzip.cpp.

#define NEEDBITS (   n)    {while(k<(n)){b|=((ulg)NEXTBYTE())<<k;k+=8;}}

Definition at line 727 of file us_gzip.cpp.

#define NEXTBYTE ( )    (uch)GETBYTE()

Definition at line 724 of file us_gzip.cpp.

#define O_BINARY   0

Definition at line 42 of file us_gzip.cpp.

#define ORIG_NAME   0x08 /* bit 3 set: original file name present */
#define OS_CODE   0x03
#define pack_level   9
#define PATH_SEP   '/'

Definition at line 1666 of file us_gzip.cpp.

#define pqremove (   tree,
  top 
)
Value:
{\
top = heap[ SMALLEST ]; \
heap[ SMALLEST ] = heap[ heap_len--] ; \
pqdownheap( tree, SMALLEST ); \
}

Definition at line 2676 of file us_gzip.cpp.

#define put_byte (   c)
Value:
{ \
outbuf[ outcnt++ ] = (uch)(c); \
if ( outcnt == OUTBUFSIZ ) flush_outbuf();\
}
#define put_long (   n)
Value:
{ \
put_short( (n) & 0xffff ); \
put_short( ( (ulg) (n) ) >> 16) ; \
}
#define put_short (   w)
Value:
{ \
if ( outcnt < OUTBUFSIZ-2 ) \
{ \
outbuf[ outcnt++ ] = (uch) ((w) & 0xff); \
outbuf[ outcnt++ ] = (uch) ((ush)(w) >> 8); \
} \
else \
{ \
put_byte( (uch) ( (w) & 0xff) ); \
put_byte( (uch) ( (ush) (w) >> 8 ) ); \
} \
}
#define REP_3_6   16

Definition at line 3020 of file us_gzip.cpp.

#define REPZ_11_138   18

Definition at line 3026 of file us_gzip.cpp.

#define REPZ_3_10   17

Definition at line 3023 of file us_gzip.cpp.

#define seekable ( )    0 /* force sequential output */
#define send_code (   c,
  tree 
)    send_bits( tree[ c ].Code, tree[ c ].Len )

Definition at line 2517 of file us_gzip.cpp.

#define slide   window

Definition at line 673 of file us_gzip.cpp.

#define SLOW   2
#define smaller (   tree,
  n,
 
)
Value:
( tree[ n ].Freq < tree[ m ].Freq || \
( tree[ n ].Freq == tree[ m ].Freq && depth[ n ] <= depth[ m ] ) )

Definition at line 2962 of file us_gzip.cpp.

#define SMALLEST   1

Definition at line 2670 of file us_gzip.cpp.

#define STATIC_TREES   1

Definition at line 2215 of file us_gzip.cpp.

#define STORED   STORED_BLOCK

Definition at line 2214 of file us_gzip.cpp.

#define STORED_BLOCK   0

Definition at line 2213 of file us_gzip.cpp.

#define TOO_FAR   4096
#define UPDATE_HASH (   h,
 
)    ( h = ( ( (h) << H_SHIFT ) ^ (c)) & HASH_MASK )

Definition at line 1739 of file us_gzip.cpp.

#define WMASK   ( WSIZE - 1 )

Definition at line 1721 of file us_gzip.cpp.

#define wp   outcnt