MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / zfile_getdata

Function zfile_getdata

src/zfile.cpp:2563–2579  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2561}
2562
2563uae_u8 *zfile_getdata (struct zfile *z, uae_s64 offset, int len, int *outlen)
2564{
2565 uae_s32 pos = zfile_ftell32(z);
2566 uae_u8 *b;
2567 if (len < 0) {
2568 zfile_fseek(z, 0, SEEK_END);
2569 len = zfile_ftell32(z);
2570 zfile_fseek(z, 0, SEEK_SET);
2571 }
2572 b = xmalloc(uae_u8, len);
2573 zfile_fseek(z, offset, SEEK_SET);
2574 zfile_fread(b, len, 1, z);
2575 zfile_fseek(z, pos, SEEK_SET);
2576 if (outlen)
2577 *outlen = len;
2578 return b;
2579}
2580
2581int zfile_zuncompress (void *dst, int dstsize, struct zfile *src, int srcsize)
2582{

Callers 10

loadcodefiledataFunction · 0.85
debugger_load_libraryFunction · 0.85
debugmem_addsegsFunction · 0.85
read_executable_romFunction · 0.85
parse_trumpcard_driverFunction · 0.85
savediskFunction · 0.85
inprec_saveFunction · 0.85
statefile_save_recordingFunction · 0.85
dsqFunction · 0.85
unwarpFunction · 0.85

Calls 3

zfile_ftell32Function · 0.85
zfile_fseekFunction · 0.85
zfile_freadFunction · 0.85

Tested by

no test coverage detected