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

Function _read_from_file

libCacheSim/traceReader/generalReader/zstdReader.c:69–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69size_t _read_from_file(zstd_reader_t *reader) {
70 size_t read_sz;
71 read_sz = fread(reader->buff_in, 1, reader->buff_in_sz, reader->ifile);
72 if (read_sz < reader->buff_in_sz) {
73 if (feof(reader->ifile)) {
74 reader->status = MY_EOF;
75 } else {
76 assert(ferror(reader->ifile));
77 reader->status = ERR;
78 return 0;
79 }
80 }
81 // DEBUG("read %zu bytes from file\n", read_sz);
82
83 reader->input.size = read_sz;
84 reader->input.pos = 0;
85
86 return read_sz;
87}
88
89rstatus _decompress_from_buff(zstd_reader_t *reader) {
90 /* move the unread decompressed data to the head of buff_out */

Callers 1

_decompress_from_buffFunction · 0.85

Calls 1

assertFunction · 0.85

Tested by

no test coverage detected