lib/zlib_dfltcc/dfltcc.h
Source file repositories/reference/linux-study-clean/lib/zlib_dfltcc/dfltcc.h
File Facts
- System
- Linux kernel
- Corpus path
lib/zlib_dfltcc/dfltcc.h- Extension
.h- Size
- 4351 bytes
- Lines
- 126
- Domain
- Kernel Services
- Bucket
- lib
- Inferred role
- Kernel Services: implementation source
- Status
- source implementation candidate
Why This File Exists
Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Shared kernel service surface used by multiple subsystems, including helpers, cryptography, virtualization support, and async I/O infrastructure.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
../zlib_deflate/defutil.hasm/facility.hasm/setup.h
Detected Declarations
struct dfltcc_qaf_paramstruct dfltcc_param_v0struct dfltcc_statestruct dfltcc_deflate_statefunction is_dfltcc_enabled
Annotated Snippet
struct dfltcc_qaf_param {
char fns[16];
char reserved1[8];
char fmts[2];
char reserved2[6];
};
static_assert(sizeof(struct dfltcc_qaf_param) == 32);
#define DFLTCC_FMT0 0
/*
* Parameter Block for Generate Dynamic-Huffman Table, Compress and Expand.
*/
struct dfltcc_param_v0 {
uint16_t pbvn; /* Parameter-Block-Version Number */
uint8_t mvn; /* Model-Version Number */
uint8_t ribm; /* Reserved for IBM use */
unsigned reserved32 : 31;
unsigned cf : 1; /* Continuation Flag */
uint8_t reserved64[8];
unsigned nt : 1; /* New Task */
unsigned reserved129 : 1;
unsigned cvt : 1; /* Check Value Type */
unsigned reserved131 : 1;
unsigned htt : 1; /* Huffman-Table Type */
unsigned bcf : 1; /* Block-Continuation Flag */
unsigned bcc : 1; /* Block Closing Control */
unsigned bhf : 1; /* Block Header Final */
unsigned reserved136 : 1;
unsigned reserved137 : 1;
unsigned dhtgc : 1; /* DHT Generation Control */
unsigned reserved139 : 5;
unsigned reserved144 : 5;
unsigned sbb : 3; /* Sub-Byte Boundary */
uint8_t oesc; /* Operation-Ending-Supplemental Code */
unsigned reserved160 : 12;
unsigned ifs : 4; /* Incomplete-Function Status */
uint16_t ifl; /* Incomplete-Function Length */
uint8_t reserved192[8];
uint8_t reserved256[8];
uint8_t reserved320[4];
uint16_t hl; /* History Length */
unsigned reserved368 : 1;
uint16_t ho : 15; /* History Offset */
uint32_t cv; /* Check Value */
unsigned eobs : 15; /* End-of-block Symbol */
unsigned reserved431: 1;
uint8_t eobl : 4; /* End-of-block Length */
unsigned reserved436 : 12;
unsigned reserved448 : 4;
uint16_t cdhtl : 12; /* Compressed-Dynamic-Huffman Table
Length */
uint8_t reserved464[6];
uint8_t cdht[288];
uint8_t reserved[32];
uint8_t csb[1152];
};
static_assert(offsetof(struct dfltcc_param_v0, csb) == 384);
static_assert(sizeof(struct dfltcc_param_v0) == 1536);
#define CVT_CRC32 0
#define CVT_ADLER32 1
#define HTT_FIXED 0
#define HTT_DYNAMIC 1
/*
* Extension of inflate_state and deflate_state for DFLTCC.
*/
struct dfltcc_state {
struct dfltcc_param_v0 param; /* Parameter block */
struct dfltcc_qaf_param af; /* Available functions */
char msg[64]; /* Buffer for strm->msg */
};
/*
* Extension of inflate_state and deflate_state for DFLTCC.
*/
struct dfltcc_deflate_state {
struct dfltcc_state common; /* Parameter block */
uLong level_mask; /* Levels on which to use DFLTCC */
uLong block_size; /* New block each X bytes */
uLong block_threshold; /* New block after total_in > X */
uLong dht_threshold; /* New block only if avail_in >= X */
};
#define ALIGN_UP(p, size) (__typeof__(p))(((uintptr_t)(p) + ((size) - 1)) & ~((size) - 1))
/* Resides right after inflate_state or deflate_state */
#define GET_DFLTCC_STATE(state) ((struct dfltcc_state *)((char *)(state) + ALIGN_UP(sizeof(*state), 8)))
Annotation
- Immediate include surface: `../zlib_deflate/defutil.h`, `asm/facility.h`, `asm/setup.h`.
- Detected declarations: `struct dfltcc_qaf_param`, `struct dfltcc_param_v0`, `struct dfltcc_state`, `struct dfltcc_deflate_state`, `function is_dfltcc_enabled`.
- Atlas domain: Kernel Services / lib.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.