tools/perf/util/compress.h
Source file repositories/reference/linux-study-clean/tools/perf/util/compress.h
File Facts
- System
- Linux kernel
- Corpus path
tools/perf/util/compress.h- Extension
.h- Size
- 2399 bytes
- Lines
- 92
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
stdbool.hstddef.hstdio.hsys/types.hlinux/compiler.hzstd.h
Detected Declarations
struct zstd_datafunction lzma_decompress_stream_to_filefunction lzma_decompress_to_filefunction lzma_is_compressedfunction zstd_initfunction zstd_finifunction zstd_compress_stream_to_recordsfunction zstd_decompress_stream
Annotated Snippet
struct zstd_data {
#ifdef HAVE_ZSTD_SUPPORT
ZSTD_CStream *cstream;
ZSTD_DStream *dstream;
int comp_level;
#endif
};
#ifdef HAVE_ZSTD_SUPPORT
int zstd_init(struct zstd_data *data, int level);
int zstd_fini(struct zstd_data *data);
ssize_t zstd_compress_stream_to_records(struct zstd_data *data, void *dst, size_t dst_size,
void *src, size_t src_size, size_t max_record_size,
size_t process_header(void *record, size_t increment));
size_t zstd_decompress_stream(struct zstd_data *data, void *src, size_t src_size,
void *dst, size_t dst_size);
#else /* !HAVE_ZSTD_SUPPORT */
static inline int zstd_init(struct zstd_data *data __maybe_unused, int level __maybe_unused)
{
return 0;
}
static inline int zstd_fini(struct zstd_data *data __maybe_unused)
{
return 0;
}
static inline
ssize_t zstd_compress_stream_to_records(struct zstd_data *data __maybe_unused,
void *dst __maybe_unused, size_t dst_size __maybe_unused,
void *src __maybe_unused, size_t src_size __maybe_unused,
size_t max_record_size __maybe_unused,
size_t process_header(void *record, size_t increment) __maybe_unused)
{
return 0;
}
static inline size_t zstd_decompress_stream(struct zstd_data *data __maybe_unused, void *src __maybe_unused,
size_t src_size __maybe_unused, void *dst __maybe_unused,
size_t dst_size __maybe_unused)
{
return 0;
}
#endif
#endif /* PERF_COMPRESS_H */
Annotation
- Immediate include surface: `stdbool.h`, `stddef.h`, `stdio.h`, `sys/types.h`, `linux/compiler.h`, `zstd.h`.
- Detected declarations: `struct zstd_data`, `function lzma_decompress_stream_to_file`, `function lzma_decompress_to_file`, `function lzma_is_compressed`, `function zstd_init`, `function zstd_fini`, `function zstd_compress_stream_to_records`, `function zstd_decompress_stream`.
- Atlas domain: Support Tooling And Documentation / tools.
- 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.