ARB
|
#include <climits>
#include <arbdbt.h>
#include "gb_key.h"
#include "gb_t_prot.h"
#include "gb_compress.h"
#include "gb_localdata.h"
#include <stdint.h>
Go to the source code of this file.
Classes | |
struct | huffmann_list |
Macros | |
#define | GBTUM_COMPRESS_TREE_SIZE 32 |
#define | GB_READ_BIT(p, c, bp, result) if (!bp) { c = *(p++); bp = 8; }; result = (c>>7); result &= 1; c <<= 1; bp-- |
#define | GB_INIT_WRITE_BITS(p, bp) *p = 0; bp = 8 |
#define | GB_WRITE_BITS(p, bp, bitc, bits, i) |
#define | GB_READ_BITS(p, c, bp, bitc, bits) |
#define | GB_COPY_NONRUN(dest, source, len) |
Variables | |
static huffmann_list * | huffmann_listhead = NULp |
#define GBTUM_COMPRESS_TREE_SIZE 32 |
Definition at line 26 of file adcompr.cxx.
Referenced by gb_compress_huffmann().
#define GB_READ_BIT | ( | p, | |
c, | |||
bp, | |||
result | |||
) | if (!bp) { c = *(p++); bp = 8; }; result = (c>>7); result &= 1; c <<= 1; bp-- |
Definition at line 29 of file adcompr.cxx.
Referenced by gb_uncompress_bits(), and gb_uncompress_huffmann().
#define GB_INIT_WRITE_BITS | ( | p, | |
bp | |||
) | *p = 0; bp = 8 |
Definition at line 31 of file adcompr.cxx.
Referenced by gb_compress_bits(), and gb_compress_huffmann().
#define GB_WRITE_BITS | ( | p, | |
bp, | |||
bitc, | |||
bits, | |||
i | |||
) |
Definition at line 33 of file adcompr.cxx.
Referenced by gb_compress_bits(), and gb_compress_huffmann().
#define GB_READ_BITS | ( | p, | |
c, | |||
bp, | |||
bitc, | |||
bits | |||
) |
Definition at line 43 of file adcompr.cxx.
Referenced by gb_uncompress_huffmann().
#define GB_COPY_NONRUN | ( | dest, | |
source, | |||
len | |||
) |
Definition at line 370 of file adcompr.cxx.
Referenced by gb_compress_equal_bytes_2().
|
static |
Definition at line 53 of file adcompr.cxx.
References GB_export_error(), gb_compress_tree::leaf, NULp, and gb_compress_tree::son.
Referenced by gb_build_uncompress_tree().
gb_compress_tree* gb_build_uncompress_tree | ( | const unsigned char * | data, |
long | short_flag, | ||
char ** | end | ||
) |
Definition at line 120 of file adcompr.cxx.
References error(), gb_check_huffmann_tree(), GB_export_error(), gb_free_compress_tree(), GB_internal_error(), GB_internal_errorf(), GBM_CB_INDEX, gbm_get_mem(), gb_compress_tree::leaf, NULp, and gb_compress_tree::son.
Referenced by gb_local_data::gb_local_data(), and gb_uncompress_huffmann().
void gb_free_compress_tree | ( | gb_compress_tree * | tree | ) |
Definition at line 183 of file adcompr.cxx.
References gb_free_compress_tree(), GBM_CB_INDEX, gbm_free_mem(), gb_compress_tree::leaf, and gb_compress_tree::son.
Referenced by gb_build_uncompress_tree(), gb_free_compress_tree(), gb_uncompress_huffmann(), and gb_local_data::~gb_local_data().
gb_compress_list* gb_build_compress_list | ( | const unsigned char * | data, |
long | short_flag, | ||
long * | size | ||
) |
Definition at line 193 of file adcompr.cxx.
References gb_compress_list::bitcnt, gb_compress_list::bits, gb_compress_list::command, command, gb_compress_list::mask, and gb_compress_list::value.
Referenced by gb_local_data::gb_local_data().
Definition at line 250 of file adcompr.cxx.
References gb_local_data::bc_size, gb_compress_list::bitcnt, gb_local_data::bitcompress, gb_compress_list::bits, buffer, gb_compress_list::command, command, GB_CS_OK, GB_CS_SUB, GB_give_other_buffer(), GB_INIT_WRITE_BITS, gb_local, GB_WRITE_BITS, s, and gb_compress_list::value.
Referenced by GB_write_bits().
Definition at line 294 of file adcompr.cxx.
References gb_local_data::bituncompress, buffer, GB_CS_OK, GB_CS_SUB, GB_give_other_buffer(), gb_local, GB_READ_BIT, gb_compress_tree::leaf, long, s, and gb_compress_tree::son.
Referenced by GB_read_bits_pntr().
Definition at line 341 of file adcompr.cxx.
Referenced by gb_compress_equal_bytes_2().
Definition at line 392 of file adcompr.cxx.
References buffer, g_b_write_run(), GB_COPY_NONRUN, and GB_RUNLENGTH_SIZE.
Referenced by gb_compress_equal_bytes(), and gb_compress_seq_by_master().
|
static |
Definition at line 447 of file adcompr.cxx.
References buffer, gb_compress_equal_bytes_2(), GB_COMPRESSION_RUNLENGTH, and GB_give_other_buffer().
Referenced by gb_compress_data().
|
static |
Definition at line 466 of file adcompr.cxx.
References huffmann_list::element, GBM_CB_INDEX, gbm_get_mem(), huffmann_listhead, huffmann_list::next, NULp, and huffmann_list::val.
Referenced by gb_compress_huffmann().
|
static |
Definition at line 493 of file adcompr.cxx.
References huffmann_list::element, GB_internal_error(), GBM_CB_INDEX, gbm_free_mem(), huffmann_list::next, and huffmann_list::val.
Referenced by gb_compress_huffmann().
|
static |
Definition at line 508 of file adcompr.cxx.
References gb_compress_list::bitcnt, gb_compress_list::bits, gb_compress_list::command, GB_CD_NODE, GBM_CB_INDEX, gbm_free_mem(), gb_compress_list::mask, gb_compress_list::son, and gb_compress_list::value.
Referenced by gb_compress_huffmann().
|
static |
Definition at line 526 of file adcompr.cxx.
References gb_compress_list::bitcnt, gb_compress_list::bits, buffer, gb_compress_list::command, gb_compress_list::count, gb_assert, GB_CD_NODE, gb_compress_huffmann_add_to_list(), gb_compress_huffmann_pop(), gb_compress_huffmann_rek(), GB_COMPRESSION_HUFFMANN, GB_CS_END, GB_CS_ID, GB_CS_OK, GB_give_other_buffer(), GB_INIT_WRITE_BITS, GB_WRITE_BITS, GBM_CB_INDEX, gbm_get_mem(), GBTUM_COMPRESS_TREE_SIZE, id, huffmann_list::next, NULp, s, gb_compress_list::son, and gb_compress_list::value.
Referenced by gb_compress_data().
|
static |
Definition at line 648 of file adcompr.cxx.
References buffer, gb_assert, and GB_give_other_buffer().
Referenced by GB_is_dictionary_compressed(), gb_uncompress_bytes(), gb_uncompress_data(), and gb_uncompress_longs_old().
|
static |
Definition at line 722 of file adcompr.cxx.
References buffer, command, gb_assert, gb_build_uncompress_tree(), GB_CS_END, GB_CS_ID, gb_free_compress_tree(), GB_give_other_buffer(), GB_READ_BIT, GB_READ_BITS, if, gb_compress_tree::leaf, long, NULp, s, and gb_compress_tree::son.
Referenced by GB_is_dictionary_compressed(), gb_uncompress_bytes(), gb_uncompress_data(), and gb_uncompress_longs_old().
GB_BUFFER gb_uncompress_bytes | ( | GB_CBUFFER | source, |
size_t | size, | ||
size_t * | new_size | ||
) |
Definition at line 761 of file adcompr.cxx.
References gb_assert, gb_uncompress_equal_bytes(), and gb_uncompress_huffmann().
Referenced by gb_convert_compression().
GB_BUFFER gb_uncompress_longs_old | ( | GB_CBUFFER | source, |
size_t | size, | ||
size_t * | new_size | ||
) |
Definition at line 772 of file adcompr.cxx.
References gb_assert, GB_give_other_buffer(), gb_uncompress_equal_bytes(), gb_uncompress_huffmann(), NULp, and STATIC_ASSERT.
Referenced by gb_convert_compression().
|
static |
Definition at line 806 of file adcompr.cxx.
References GB_give_other_buffer(), and STATIC_ASSERT.
Referenced by GB_is_dictionary_compressed(), and gb_uncompress_data().
|
static |
Definition at line 832 of file adcompr.cxx.
References GB_COMPRESSION_SORTBYTES, and GB_give_other_buffer().
Referenced by gb_compress_data().
GB_DICTIONARY* gb_get_dictionary | ( | GB_MAIN_TYPE * | Main, |
GBQUARK | key | ||
) |
Definition at line 857 of file adcompr.cxx.
References gb_Key::dictionary, GB_internal_error(), gb_Key::gb_key, GB_MAIN_TYPE::gb_key_data, gb_Key::gb_key_disabled, gb_load_single_key_data(), GB_MAIN_TYPE::gb_main(), GB_MAIN_TYPE::keys, and NULp.
Referenced by gb_compress_data(), gb_create_dictionaries(), and gb_uncompress_by_dictionary().
bool GB_is_dictionary_compressed | ( | GBDATA * | gbd | ) |
Definition at line 869 of file adcompr.cxx.
References GBDATA::as_entry(), gb_flag_types::compressed_data, GBENTRY::data(), error(), GBDATA::flags, GB_COMPRESSION_DICTIONARY, GB_COMPRESSION_HUFFMANN, GB_COMPRESSION_LAST, GB_COMPRESSION_RUNLENGTH, GB_COMPRESSION_SEQUENCE, GB_COMPRESSION_SORTBYTES, GB_COMPRESSION_TAGS_SIZE_MAX, GB_export_errorf(), GB_internal_error(), GB_read_key_pntr(), gb_uncompress_by_sequence(), gb_uncompress_equal_bytes(), gb_uncompress_huffmann(), gb_uncompress_longs(), GBDATA::is_entry(), NULp, and GBENTRY::uncompressed_size().
Referenced by deleteDataOfKey(), readFirstCompressedDataOf(), and testDictionaryCompression().
GB_BUFFER gb_compress_data | ( | GBDATA * | gbd, |
int | key, | ||
GB_CBUFFER | source, | ||
size_t | size, | ||
size_t * | msize, | ||
GB_COMPRESSION_MASK | max_compr, | ||
bool | pre_compressed | ||
) |
Definition at line 923 of file adcompr.cxx.
References gb_assert, gb_compress_by_dictionary(), gb_compress_equal_bytes(), gb_compress_huffmann(), gb_compress_longs(), GB_COMPRESSION_DICTIONARY, GB_COMPRESSION_HUFFMANN, GB_COMPRESSION_LAST, GB_COMPRESSION_RUNLENGTH, GB_COMPRESSION_SORTBYTES, gb_get_dictionary(), GB_HUFFMAN_MIN_SIZE, GB_KEY_QUARK(), GB_MAIN(), GB_RUNLENGTH_MIN_SIZE, GB_STRING, NULp, and GBDATA::type().
Referenced by gb_compress_sequence_by_master(), and GB_write_pntr().
GB_CBUFFER gb_uncompress_data | ( | GBDATA * | gbd, |
GB_CBUFFER | source, | ||
size_t | size | ||
) |
Definition at line 990 of file adcompr.cxx.
References error(), GB_await_error(), GB_COMPRESSION_DICTIONARY, GB_COMPRESSION_HUFFMANN, GB_COMPRESSION_LAST, GB_COMPRESSION_RUNLENGTH, GB_COMPRESSION_SEQUENCE, GB_COMPRESSION_SORTBYTES, GB_COMPRESSION_TAGS_SIZE_MAX, GB_export_error(), GB_read_key_pntr(), gb_uncompress_by_dictionary(), gb_uncompress_by_sequence(), gb_uncompress_equal_bytes(), gb_uncompress_huffmann(), gb_uncompress_longs(), GBS_global_string(), and NULp.
Referenced by GB_read_pntr(), and gb_read_pntr_ts().
|
static |
Definition at line 464 of file adcompr.cxx.
Referenced by gb_compress_huffmann_add_to_list().