1
0
mirror of https://github.com/facebook/zstd.git synced 2025-07-30 22:23:13 +03:00

added test case for seekTable API

and simple roundtrip test
This commit is contained in:
Yann Collet
2021-03-03 18:55:34 -08:00
parent 6c0bfc468c
commit 16ec1cf355
3 changed files with 80 additions and 6 deletions

View File

@ -64,15 +64,14 @@ struct ZSTD_seekable_CStream_s {
int writingSeekTable;
};
size_t ZSTD_seekable_frameLog_allocVec(ZSTD_frameLog* fl)
static size_t ZSTD_seekable_frameLog_allocVec(ZSTD_frameLog* fl)
{
/* allocate some initial space */
size_t const FRAMELOG_STARTING_CAPACITY = 16;
fl->entries = (framelogEntry_t*)malloc(
sizeof(framelogEntry_t) * FRAMELOG_STARTING_CAPACITY);
if (fl->entries == NULL) return ERROR(memory_allocation);
fl->capacity = FRAMELOG_STARTING_CAPACITY;
fl->capacity = (U32)FRAMELOG_STARTING_CAPACITY;
return 0;
}