MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / _read_bytes

Function _read_bytes

libCacheSim/traceReader/customizedReader/binaryUtils.h:14–23  ·  view source on GitHub ↗

read decompressed data file */

Source from the content-addressed store, hash-verified

12
13/* read decompressed data file */
14static inline char *_read_bytes(reader_t *reader, size_t size) {
15 if (reader->mmap_offset >= reader->file_size) {
16 return NULL;
17 }
18
19 char *start = (reader->mapped_file + reader->mmap_offset);
20 reader->mmap_offset += size;
21
22 return start;
23}
24
25#ifdef SUPPORT_ZSTD_TRACE
26/* read zstd compressed data */

Callers 1

read_bytesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected