A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/ct__nlmzip__dcompr_8cpp_source.html below:

NCBI C++ ToolKit: src/ctools/ctransition/ct_nlmzip_dcompr.cpp Source File

160  "Invalid parameter"

,

161  "Output buffer overflow"

,

178  const char

* lpFileName,

180  const char

* lpMessage

183

printf(

"Error: %s(%d) - %s\n"

,lpFileName,iLine,lpMessage);

211  URCOMPRERR

(

"No more data in input buffer"

);

225  unsigned char

* pData,

268  unsigned char

theChar

284  unsigned short

usData

321  unsigned char

* pData,

345  const void

* pInputData,

351  unsigned char

ucFlags = 0;

352  unsigned short

usAttr =

BINARY

;

353  unsigned short

usDeflateFlags = 0;

356  if

( pInputData ==

NULL 357

|| pOutputBuff ==

NULL 358

|| ipCompressedSize ==

NULL

) {

366

*ipCompressedSize = 0;

369  pInBuffer

= (

unsigned char

*)pInputData;

423  const void

* pInputData,

436  if

( pInputData ==

NULL 437

|| pOutputBuff ==

NULL 438

|| ipUncompressedSize ==

NULL

) {

445

*ipUncompressedSize = 0;

448  pInBuffer

= (

unsigned char

*)pInputData;

461  if

( memcmp (cBuffer,

MAGIC_KEY

, 2) != 0 ) {

467  URCOMPRERR

(

"Invalid compression Nlmzip_method"

);

472

(

unsigned char

*)cBuffer,

482  URCOMPRERR

(

"Out of memory on uncompression"

);

483

}

else if

( iResult != 0 ) {

484  URCOMPRERR

(

"Invalid compressed data(format violated)"

);

492

ulOrigCrc =

LG

(cBuffer);

493

ulOrigLen =

LG

(cBuffer+4);

498

&& ulOrigCrc != ulCurCrc ) {

499  URCOMPRERR

(

"Invalid compressed data(CRC error)"

);

502  URCOMPRERR

(

"Invalid compressed data(length error)"

);

526  return "Invalid error code"

;

540  char

* lpTemp = (

char

*)pBuffer;

543

lpTemp = lpTemp + iSize -

sizeof

(

Int4

);

556 const unsigned char kMagic

[2] = {0x2f, 0x9a};

561  const void

* src_buf,

size_t

src_len,

562  void

* dst_buf,

size_t

dst_size,

570  if

(!src_len || !src_buf || !dst_buf || dst_size <=

kHeaderSize

) {

574  unsigned char

* dst = (

unsigned char

*)dst_buf;

579

dst[2] = (

unsigned

char)method;

591  if

(src_len > dst_size) {

594

memcpy(dst, src_buf, src_len);

607 #if defined(HAVE_LIBLZO) 645  const void

* src_buf,

size_t

src_len,

646  void

* dst_buf,

size_t

dst_size,

652  if

(!src_len || !src_buf || !dst_buf) {

657  unsigned char

* src = (

unsigned char

*)src_buf;

659  bool

old_format =

true

;

675

*dst_len = (size_t)

n

;

686  if

(src_len > dst_size) {

689

memcpy(dst_buf, src, src_len);

702 #if defined(HAVE_LIBLZO)

void Nlmzip_bi_init(void)

void Nlmzip_CompressInit(void)

void Nlmzip_WriteByte(unsigned char theChar)

DEFINE_STATIC_FAST_MUTEX(s_NlmZip)

void Nlmzip_WriteLong(ulg ulData)

void Nlmzip_WriteShort(unsigned short usData)

unsigned short Nlmzip_prev[1L<< 16]

static const char * theComprErr[]

const unsigned char kMagic[2]

unsigned char Nlmzip_inbuf[0x8000]

void Nlmzip_WriteData(unsigned char *pData, int iSize)

void Nlmzip_ReadUndo(void)

unsigned char Nlmzip_outbuf[16384]

BEGIN_CTRANSITION_SCOPE int Nlmzip_level

unsigned char Nlmzip_ReadByte(void)

static unsigned char * pOutBuffer

void Nlmzip_Err(const char *lpFileName, int iLine, const char *lpMessage)

unsigned char Nlmzip_window[2L *0x8000]

unsigned short Nlmzip_d_buf[0x8000]

static jmp_buf theErrJumper

int Nlmzip_ReadData(unsigned char *pData, int iSize)

static unsigned char * pInBuffer

void Nlmzip_lm_init(int pack_level, ush *flags)

void Nlmzip_ct_init(unsigned short *, int *)

ulg Nlmzip_updcrc(unsigned char *, Uint4)

EMethod

Compression/decompression methods.

@ eZip

ZLIB (raw zip data / DEFLATE method)

@ eNone

no compression method (copy "as is")

@ eConcatenatedGZipFile

Synonym for eGZipFile (for backward compatibility) - deprecated.

@ eGZipFile

.gz file (including concatenated files)

virtual bool DecompressBuffer(const void *src_buf, size_t src_len, void *dst_buf, size_t dst_size, size_t *dst_len)

Decompress data in the buffer.

virtual bool CompressBuffer(const void *src_buf, size_t src_len, void *dst_buf, size_t dst_size, size_t *dst_len)

Compress data in the buffer.

virtual bool DecompressBuffer(const void *src_buf, size_t src_len, void *dst_buf, size_t dst_size, size_t *dst_len)

Decompress data in the buffer.

virtual void SetFlags(TFlags flags)

virtual TFlags GetFlags(void) const

Get/set flags.

ELevel

Compression level.

virtual bool CompressBuffer(const void *src_buf, size_t src_len, void *dst_buf, size_t dst_size, size_t *dst_len)

Compress data in the buffer.

virtual bool CompressBuffer(const void *src_buf, size_t src_len, void *dst_buf, size_t dst_size, size_t *dst_len)

Compress data in the buffer.

virtual bool DecompressBuffer(const void *src_buf, size_t src_len, void *dst_buf, size_t dst_size, size_t *dst_len)

Decompress data in the buffer.

@ fGZip

Set of flags for gzip file support. See each flag description above.

#define NCBI_THROW(exception_class, err_code, message)

Generic macro to throw an exception, given the exception class, error code and message string.

int32_t Int4

4-byte (32-bit) signed integer

uint32_t Uint4

4-byte (32-bit) unsigned integer

TFastMutexGuard CFastMutexGuard

...and backward compatibility

unsigned int

A callback function used to compare two keys in a database.

Multi-threading – mutexes; rw-locks; semaphore.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4