include/linux/zutil.h
Source file repositories/reference/linux-study-clean/include/linux/zutil.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/zutil.h- Extension
.h- Size
- 2793 bytes
- Lines
- 107
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
Dependency Surface
linux/zlib.hlinux/string.hlinux/kernel.h
Detected Declarations
function zlib_adler32
Annotated Snippet
while (read_buffer(buffer, length) != EOF) {
adler = zlib_adler32(adler, buffer, length);
}
if (adler != original_adler) error();
*/
static inline uLong zlib_adler32(uLong adler,
const Byte *buf,
uInt len)
{
unsigned long s1 = adler & 0xffff;
unsigned long s2 = (adler >> 16) & 0xffff;
int k;
if (buf == NULL) return 1L;
while (len > 0) {
k = len < NMAX ? len : NMAX;
len -= k;
while (k >= 16) {
DO16(buf);
buf += 16;
k -= 16;
}
if (k != 0) do {
s1 += *buf++;
s2 += s1;
} while (--k);
s1 %= BASE;
s2 %= BASE;
}
return (s2 << 16) | s1;
}
#endif /* _Z_UTIL_H */
Annotation
- Immediate include surface: `linux/zlib.h`, `linux/string.h`, `linux/kernel.h`.
- Detected declarations: `function zlib_adler32`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.