Open CasualPokePlayer opened 1 year ago
Seems the issue here is that ZSTD_getFrameContentSize is returning ZSTD_CONTENTSIZE_UNKNOWN. This is also noted in the zstd manual:
decompressed size is an optional field, it may not be present, typically in streaming mode.
When `return==ZSTD_CONTENTSIZE_UNKNOWN`, data to decompress could be any size.
In which case, it's necessary to use streaming mode to decompress data.
Optionally, application can rely on some implicit limit,
as ZSTD_decompress() only needs an upper bound of decompressed size.
(For example, data could be necessarily cut into blocks <= 16 KB).
This is probably from me using 7-zip-zstd to compress this ROM, which probably uses ZSTD streaming mode under the hood.
Occurs on both Windows and Linux.