@@ -264,9 +264,10 @@ struct isal_huff_histogram {
264
264
uint16_t hash_table [IGZIP_LVL0_HASH_SIZE ]; //!< Tmp space used as a hash table
265
265
};
266
266
267
+ /** @brief Holds modified histogram */
267
268
struct isal_mod_hist {
268
- uint32_t d_hist [30 ];
269
- uint32_t ll_hist [513 ];
269
+ uint32_t d_hist [30 ]; //!< Distance
270
+ uint32_t ll_hist [513 ]; //! Literal/length
270
271
};
271
272
272
273
#define ISAL_DEF_MIN_LEVEL 0
@@ -325,17 +326,19 @@ struct BitBuf2 {
325
326
uint8_t * m_out_start ; //!< start of buffer to write to
326
327
};
327
328
329
+ /** @brief Holds Zlib header information */
328
330
struct isal_zlib_header {
329
331
uint32_t info ; //!< base-2 logarithm of the LZ77 window size minus 8
330
332
uint32_t level ; //!< Compression level (fastest, fast, default, maximum)
331
333
uint32_t dict_id ; //!< Dictionary id
332
334
uint32_t dict_flag ; //!< Whether to use a dictionary
333
335
};
334
336
337
+ /** @brief Holds Gzip header information */
335
338
struct isal_gzip_header {
336
339
uint32_t text ; //!< Optional Text hint
337
340
uint32_t time ; //!< Unix modification time in gzip header
338
- uint32_t xflags ; //!< xflags in gzip header
341
+ uint32_t xflags ; //!< xflags in gzip header
339
342
uint32_t os ; //!< OS in gzip header
340
343
uint8_t * extra ; //!< Extra field in gzip header
341
344
uint32_t extra_buf_len ; //!< Length of extra buffer
@@ -421,11 +424,11 @@ struct isal_zstream {
421
424
/******************************************************************************/
422
425
/*
423
426
* Inflate_huff_code data structures are used to store a Huffman code for fast
424
- * lookup. It works by performing a lookup in small_code_lookup that hopefully
427
+ * lookup. It works by performing a lookup in short_code_lookup that hopefully
425
428
* yields the correct symbol. Otherwise a lookup into long_code_lookup is
426
429
* performed to find the correct symbol. The details of how this works follows:
427
430
*
428
- * Let i be some index into small_code_lookup and let e be the associated
431
+ * Let i be some index into short_code_lookup and let e be the associated
429
432
* element. Bit 15 in e is a flag. If bit 15 is not set, then index i contains
430
433
* a Huffman code for a symbol which has length at most DECODE_LOOKUP_SIZE. Bits
431
434
* 0 through 8 are the symbol associated with that code and bits 9 through 12 of
@@ -437,11 +440,11 @@ struct isal_zstream {
437
440
* index i. The offset into long_code_lookup is for an array associated with all
438
441
* codes which start with the bits in i.
439
442
*
440
- * The elements of long_code_lookup are in the same format as small_code_lookup ,
443
+ * The elements of long_code_lookup are in the same format as short_code_lookup ,
441
444
* except bit 15 is never set. Let i be a number made up of DECODE_LOOKUP_SIZE
442
445
* bits. Then all Huffman codes which start with DECODE_LOOKUP_SIZE bits are
443
446
* stored in an array starting at index h in long_code_lookup. This index h is
444
- * stored in bits 0 through 9 at index i in small_code_lookup . The index j is an
447
+ * stored in bits 0 through 9 at index i in short_code_lookup . The index j is an
445
448
* index of this array if the number of bits contained in j and i is the number
446
449
* of bits in the longest huff_code starting with the bits of i. The symbol
447
450
* stored at index j is the symbol whose huffcode can be found in (j <<
@@ -450,7 +453,7 @@ struct isal_zstream {
450
453
*
451
454
* The following are explanations for sizes of the tables:
452
455
*
453
- * Since small_code_lookup is a lookup on DECODE_LOOKUP_SIZE bits, it must have
456
+ * Since short_code_lookup is a lookup on DECODE_LOOKUP_SIZE bits, it must have
454
457
* size 2^DECODE_LOOKUP_SIZE.
455
458
*
456
459
* To determine the amount of memory required for long_code_lookup, note that
@@ -488,16 +491,16 @@ struct isal_zstream {
488
491
#define ISAL_HUFF_CODE_LARGE_LONG_ALIGNED (ISAL_L_SIZE + (-ISAL_L_SIZE & 0xf))
489
492
#define ISAL_HUFF_CODE_SMALL_LONG_ALIGNED (ISAL_S_SIZE + (-ISAL_S_SIZE & 0xf))
490
493
491
- /* Large lookup table for decoding huffman codes */
494
+ /** @brief Large lookup table for decoding huffman codes */
492
495
struct inflate_huff_code_large {
493
- uint32_t short_code_lookup [1 << (ISAL_DECODE_LONG_BITS )];
494
- uint16_t long_code_lookup [ISAL_HUFF_CODE_LARGE_LONG_ALIGNED ];
496
+ uint32_t short_code_lookup [1 << (ISAL_DECODE_LONG_BITS )]; //!< Short code lookup table
497
+ uint16_t long_code_lookup [ISAL_HUFF_CODE_LARGE_LONG_ALIGNED ]; //!< Long code lookup table
495
498
};
496
499
497
- /* Small lookup table for decoding huffman codes */
500
+ /** @brief Small lookup table for decoding huffman codes */
498
501
struct inflate_huff_code_small {
499
- uint16_t short_code_lookup [1 << (ISAL_DECODE_SHORT_BITS )];
500
- uint16_t long_code_lookup [ISAL_HUFF_CODE_SMALL_LONG_ALIGNED ];
502
+ uint16_t short_code_lookup [1 << (ISAL_DECODE_SHORT_BITS )]; //!<Short code lookup table
503
+ uint16_t long_code_lookup [ISAL_HUFF_CODE_SMALL_LONG_ALIGNED ]; //!< Long code lookup table
501
504
};
502
505
503
506
/** @brief Holds decompression state information*/
0 commit comments