ZInflate.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "zlib.h"

Go to the source code of this file.

Classes

struct  huft

Defines

#define NULL   0L
#define INFMOD
#define WSIZE   0x8000
#define NEXTBYTE   R__ReadByte()
#define FPRINTF   fprintf
#define FLUSH(n, obufptr, obufcnt, R__slide)   R__WriteData(n,obufptr,obufcnt,R__slide)
#define Trace(x)
#define OF(a)   ()
#define CHECK_EOF
#define NEEDBITS(n, b, k, ibufptr, ibufcnt)
#define DUMPBITS(n, b, k)   {(b)>>=(n);(k)-=(n);}
#define BMAX   16
#define N_MAX   288
#define HDRSIZE   9

Typedefs

typedef char boolean
typedef unsigned char uch
typedef unsigned short ush
typedef unsigned long ulg

Functions

int R__huft_build OF ((unsigned *, unsigned, unsigned, const ush *, const ush *, struct huft **, int *, unsigned *))
int R__huft_free OF ((struct huft *))
int R__Inflate_codes OF ((struct huft *, struct huft *, int, int, uch **, long *, uch **, long *, ulg *, unsigned *, uch *, unsigned *))
int R__Inflate_stored OF ((uch **, long *, uch **, long *, ulg *, unsigned *, uch *, unsigned *))
int R__Inflate_fixed OF ((uch **, long *, uch **, long *, ulg *, unsigned *, uch *, unsigned *, unsigned *))
int R__Inflate_block OF ((int *, uch **, long *, uch **, long *, ulg *, unsigned *, uch *, unsigned *, unsigned *))
int R__Inflate OF ((uch **, long *, uch **, long *))
int R__Inflate_free OF ((void))
static void R__WriteData OF ((int, uch **, long *, uch *))
int R__huft_build (unsigned *b, unsigned n, unsigned s, const ush *d, const ush *e, struct huft **t, int *m, unsigned *hufts)
int R__huft_free (struct huft *t)
int R__Inflate_codes (struct huft *tl, struct huft *td, int bl, int bd, uch **ibufptr, long *ibufcnt, uch **obufptr, long *obufcnt, ulg *bb, unsigned *bk, uch *R__slide, unsigned *wp)
int R__Inflate_stored (uch **ibufptr, long *ibufcnt, uch **obufptr, long *obufcnt, ulg *bb, unsigned *bk, uch *R__slide, unsigned *wp)
int R__Inflate_fixed (uch **ibufptr, long *ibufcnt, uch **obufptr, long *obufcnt, ulg *bb, unsigned *bk, uch *R__slide, unsigned *wp, unsigned *hufts)
int R__Inflate_dynamic (uch **ibufptr, long *ibufcnt, uch **obufptr, long *obufcnt, ulg *bb, unsigned *bk, uch *R__slide, unsigned *wp, unsigned *hufts)
int R__Inflate_block (int *e, uch **ibufptr, long *ibufcnt, uch **obufptr, long *obufcnt, ulg *bb, unsigned *bk, uch *R__slide, unsigned *wp, unsigned *hufts)
int R__Inflate (uch **ibufptr, long *ibufcnt, uch **obufptr, long *obufcnt)
int R__Inflate_free ()
int R__unzip_header (int *srcsize, uch *src, int *tgtsize)
void R__unzip (int *srcsize, uch *src, int *tgtsize, uch *tgt, int *irep)
static void R__WriteData (int n, uch **obufptr, long *obufcnt, uch *R__slide)

Variables

static const int qflag = 0
static const unsigned border []
static const ush cplens []
static const ush cplext []
static const ush cpdist []
static const ush cpdext []
static const ush mask []
static const int lbits = 9
static const int dbits = 6
huftR__fixed_tl = (struct huft *)NULL
huftR__fixed_td
int R__fixed_bl
int R__fixed_bd


Define Documentation

#define BMAX   16

Definition at line 390 of file ZInflate.c.

Referenced by huft_build(), and R__huft_build().

#define CHECK_EOF

Definition at line 335 of file ZInflate.c.

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

Definition at line 349 of file ZInflate.c.

Referenced by inflate_blocks(), inflate_codes(), R__Inflate_block(), R__Inflate_codes(), R__Inflate_dynamic(), and R__Inflate_stored().

#define FLUSH ( n,
obufptr,
obufcnt,
R__slide   )     R__WriteData(n,obufptr,obufcnt,R__slide)

Definition at line 238 of file ZInflate.c.

Referenced by inflate_blocks(), inflate_codes(), R__Inflate(), R__Inflate_codes(), and R__Inflate_stored().

#define FPRINTF   fprintf

Definition at line 234 of file ZInflate.c.

Referenced by R__Inflate_dynamic().

#define HDRSIZE   9

Definition at line 1117 of file ZInflate.c.

#define INFMOD

Definition at line 215 of file ZInflate.c.

#define N_MAX   288

Definition at line 391 of file ZInflate.c.

Referenced by R__huft_build().

#define NEEDBITS ( n,
b,
k,
ibufptr,
ibufcnt   ) 

Value:

{while((k)<(n)){if((ibufcnt)-- <= 0)return 1;\
   (b)|=((ulg) *(ibufptr)++)<<(k);(k)+=8;}}

Definition at line 345 of file ZInflate.c.

#define NEXTBYTE   R__ReadByte()

Definition at line 230 of file ZInflate.c.

#define NULL   0L

Definition at line 15 of file ZInflate.c.

#define OF (  )     ()

Definition at line 274 of file ZInflate.c.

#define Trace ( x   ) 

Definition at line 247 of file ZInflate.c.

#define WSIZE   0x8000

Definition at line 226 of file ZInflate.c.


Typedef Documentation

typedef char boolean

Definition at line 220 of file ZInflate.c.

typedef unsigned char uch

Definition at line 221 of file ZInflate.c.

typedef unsigned long ulg

Definition at line 223 of file ZInflate.c.

typedef unsigned short ush

Definition at line 222 of file ZInflate.c.


Function Documentation

static void R__WriteData OF ( (int, uch **, long *, uch *)   )  [static]

int R__Inflate_free OF ( (void)   ) 

int R__Inflate OF ( (uch **, long *, uch **, long *)   ) 

int R__Inflate_block OF ( (int *, uch **, long *, uch **, long *, ulg *, unsigned *, uch *, unsigned *, unsigned *)   ) 

int R__Inflate_fixed OF ( (uch **, long *, uch **, long *, ulg *, unsigned *, uch *, unsigned *, unsigned *)   ) 

int R__Inflate_stored OF ( (uch **, long *, uch **, long *, ulg *, unsigned *, uch *, unsigned *)   ) 

int R__Inflate_codes OF ( (struct huft *, struct huft *, int, int, uch **, long *, uch **, long *, ulg *, unsigned *, uch *, unsigned *)   ) 

int R__huft_free OF ( (struct huft *)   ) 

int R__huft_build OF ( (unsigned *, unsigned, unsigned, const ush *, const ush *, struct huft **, int *, unsigned *)   ) 

int R__huft_build ( unsigned *  b,
unsigned  n,
unsigned  s,
const ush d,
const ush e,
struct huft **  t,
int *  m,
unsigned *  hufts 
)

Definition at line 394 of file ZInflate.c.

References a, BMAX, c, g, h, i, if(), j, k, l, malloc(), N_MAX, NULL, p, R__huft_free(), t, u, w, x, and y.

Referenced by R__Inflate_dynamic(), and R__Inflate_fixed().

int R__huft_free ( struct huft t  ) 

Definition at line 592 of file ZInflate.c.

References free(), NULL, p, and t.

Referenced by R__huft_build(), R__Inflate_dynamic(), R__Inflate_fixed(), and R__Inflate_free().

int R__Inflate ( uch **  ibufptr,
long ibufcnt,
uch **  obufptr,
long obufcnt 
)

Definition at line 1045 of file ZInflate.c.

References huft::e, FLUSH, h, R__Inflate_block(), and Trace.

Referenced by R__unzip().

int R__Inflate_block ( int *  e,
uch **  ibufptr,
long ibufcnt,
uch **  obufptr,
long obufcnt,
ulg bb,
unsigned *  bk,
uch R__slide,
unsigned *  wp,
unsigned *  hufts 
)

Definition at line 1001 of file ZInflate.c.

References b, DUMPBITS, int, k, NEEDBITS, R__Inflate_dynamic(), R__Inflate_fixed(), R__Inflate_stored(), and t.

Referenced by R__Inflate().

int R__Inflate_codes ( struct huft tl,
struct huft td,
int  bl,
int  bd,
uch **  ibufptr,
long ibufcnt,
uch **  obufptr,
long obufcnt,
ulg bb,
unsigned *  bk,
uch R__slide,
unsigned *  wp 
)

Definition at line 620 of file ZInflate.c.

References b, d, DUMPBITS, huft::e, FLUSH, if(), k, n, NEEDBITS, t, w, and WSIZE.

Referenced by R__Inflate_fixed().

int R__Inflate_dynamic ( uch **  ibufptr,
long ibufcnt,
uch **  obufptr,
long obufcnt,
ulg bb,
unsigned *  bk,
uch R__slide,
unsigned *  wp,
unsigned *  hufts 
)

Definition at line 836 of file ZInflate.c.

References b, DUMPBITS, FPRINTF, i, j, k, l, m, huft::n, n, NEEDBITS, NULL, qflag, R__huft_build(), R__huft_free(), Trace, and huft::v.

Referenced by R__Inflate_block().

int R__Inflate_fixed ( uch **  ibufptr,
long ibufcnt,
uch **  obufptr,
long obufcnt,
ulg bb,
unsigned *  bk,
uch R__slide,
unsigned *  wp,
unsigned *  hufts 
)

Definition at line 788 of file ZInflate.c.

References i, l, NULL, R__fixed_td, R__fixed_tl, R__huft_build(), R__huft_free(), R__Inflate_codes(), and Trace.

Referenced by R__Inflate_block().

int R__Inflate_free (  ) 

Definition at line 1089 of file ZInflate.c.

References NULL, R__fixed_td, R__fixed_tl, and R__huft_free().

int R__Inflate_stored ( uch **  ibufptr,
long ibufcnt,
uch **  obufptr,
long obufcnt,
ulg bb,
unsigned *  bk,
uch R__slide,
unsigned *  wp 
)

Definition at line 730 of file ZInflate.c.

References b, DUMPBITS, FLUSH, k, n, NEEDBITS, Trace, w, and WSIZE.

Referenced by R__Inflate_block().

void R__unzip ( int *  srcsize,
uch src,
int *  tgtsize,
uch tgt,
int *  irep 
)

Definition at line 1142 of file ZInflate.c.

Referenced by TKey::Read(), TBasket::ReadBasketBuffers(), TKey::ReadObj(), TKey::ReadObjectAny(), TKey::ReadObjWithBuffer(), TMessage::Uncompress(), TTreeCacheUnzip::UnzipBuffer(), and TBufferXML::XmlReadBlock().

int R__unzip_header ( int *  srcsize,
uch src,
int *  tgtsize 
)

Definition at line 1119 of file ZInflate.c.

References fprintf(), HDRSIZE, long, and Z_DEFLATED.

Referenced by TKey::Read(), TBasket::ReadBasketBuffers(), TKey::ReadObj(), TKey::ReadObjectAny(), TKey::ReadObjWithBuffer(), TMessage::Uncompress(), and TTreeCacheUnzip::UnzipBuffer().

static void R__WriteData ( int  n,
uch **  obufptr,
long obufcnt,
uch R__slide 
) [static]

Definition at line 1244 of file ZInflate.c.


Variable Documentation

const unsigned border[] [static]

Initial value:

 {    
        16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}

Definition at line 289 of file ZInflate.c.

Referenced by TGX11::ClearPixmap(), TGX11::CopyWindowtoPixmap(), TGIcon::DoRedraw(), TGTextEntry::DoRedraw(), TSliderBox::ExecuteEvent(), FT_Glyph_StrokeBorder(), ft_stroke_border_arcto(), ft_stroke_border_close(), ft_stroke_border_conicto(), ft_stroke_border_cubicto(), ft_stroke_border_done(), ft_stroke_border_export(), ft_stroke_border_get_counts(), ft_stroke_border_grow(), ft_stroke_border_init(), ft_stroke_border_lineto(), ft_stroke_border_moveto(), ft_stroke_border_reset(), ft_stroker_arcto(), ft_stroker_cap(), ft_stroker_inside(), FT_Stroker_LineTo(), ft_stroker_outside(), ft_stroker_subpath_start(), TGX11::GetGeometry(), inflate_blocks(), TGX11::InitWindow(), TGWin32::InitWindow(), TGX11::OpenPixmap(), TGWin32::OpenPixmap(), quarks(), TGIcon::Resize(), TGWin32::ResizePixmap(), TGX11::ResizePixmap(), and TGX11::ResizeWindow().

const ush cpdext[] [static]

Initial value:

 {         
        0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
        7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
        12, 12, 13, 13}

Definition at line 302 of file ZInflate.c.

const ush cpdist[] [static]

Initial value:

 {         
        1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
        257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
        8193, 12289, 16385, 24577}

Definition at line 298 of file ZInflate.c.

const ush cplens[] [static]

Initial value:

 {         
        3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
        35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}

Definition at line 291 of file ZInflate.c.

const ush cplext[] [static]

Initial value:

 {         
        0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
        3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99}

Definition at line 295 of file ZInflate.c.

const int dbits = 6 [static]

Definition at line 386 of file ZInflate.c.

const int lbits = 9 [static]

Definition at line 385 of file ZInflate.c.

const ush mask[] [static]

Initial value:

 {
    0x0000,
    0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
    0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
}

Definition at line 308 of file ZInflate.c.

Referenced by _gdk_pixmap_create_from_xpm(), TGHtml::AddStyle(), asimage2alpha(), TGWin32::ChangeGC(), TGQt::CopyArea(), TGSlider::CreateDisabledPicture(), TGPictureButton::CreateDisabledPicture(), TGLWidget::CreateWindow(), TGHtml::DrawTableBgnd(), PyROOT::Utility::EffectiveType(), file2pixmap(), TGX11::FindBestVisual(), ft_bitmap_assure_buffer(), ftc_cache_resize(), gdk_cursor_new_from_pixmap(), gdk_event_translate(), gdk_gc_set_clip_mask(), gdk_nmbstowchar_ts(), gdk_nmbstowcs(), gdk_pixmap_colormap_create_from_xpm(), gdk_pixmap_colormap_create_from_xpm_d(), gdk_pixmap_create_from_xpm(), gdk_pixmap_create_from_xpm_d(), gdk_window_set_icon(), gdk_window_shape_combine_mask(), get_asimage_chanmask(), TWinNTSystem::GetFPEMask(), TUnixSystem::GetFPEMask(), TGGC::GetMaskString(), TRootContextMenu::HandleMotion(), TProofServ::HandleSocketInput(), TGToolTip::HandleTimer(), huft_build(), TASImage::Image2Drawable(), inflate_table(), TGLFormat::InitAvailableSamples(), TX11GLManager::InitGLWindow(), TGWin32::MapGCValues(), TGX11::MapGCValues(), TGX11::MapPictureAttributes(), TGWin32::MapSetWindowAttributes(), TGX11::MapSetWindowAttributes(), XrdClientThread::MaskSignal(), pfr_bitwriter_decode_bytes(), pfr_bitwriter_decode_rle1(), pfr_bitwriter_decode_rle2(), pfr_glyph_load_simple(), png_do_pack(), png_do_unshift(), ps_dimension_add_t1stem(), ps_dimension_end_mask(), ps_dimension_reset_mask(), ps_mask_clear_bit(), ps_mask_done(), ps_mask_ensure(), ps_mask_set_bit(), ps_mask_table_alloc(), ps_mask_table_done(), ps_mask_table_last(), ps_mask_table_set_bits(), ps_mask_test_bit(), psh_glyph_find_strong_points(), psh_hint_table_activate_mask(), psh_hint_table_init(), psh_hint_table_record_mask(), query_screen_visual_id(), TGWin32::QueryPointer(), TDirectory::rmdir(), TDirectoryFile::rmdir(), XrdCmsCluster::SelNode(), TGContainer::SetDragPixmap(), TGScrollBarElement::SetEnabled(), setup_pseudo_visual(), RooDataHist::sum(), test_one_line_on_drawable(), test_one_point_on_drawable(), test_one_rectangle_on_drawable(), test_some_arcs_on_drawable(), TMonitor::TMonitor(), TRandom1::TRandom1(), tt_face_get_kerning(), and tt_face_load_kern().

const int qflag = 0 [static]

Definition at line 18 of file ZInflate.c.

Referenced by R__Inflate_dynamic().

int R__fixed_bd

Definition at line 786 of file ZInflate.c.

int R__fixed_bl

Definition at line 786 of file ZInflate.c.

struct huft* R__fixed_td

Definition at line 785 of file ZInflate.c.

Referenced by R__Inflate_fixed(), and R__Inflate_free().

struct huft* R__fixed_tl = (struct huft *)NULL

Definition at line 784 of file ZInflate.c.

Referenced by R__Inflate_fixed(), and R__Inflate_free().


Generated on Tue Jul 5 15:57:36 2011 for ROOT_528-00b_version by  doxygen 1.5.1