kamcheungting-db commented on code in PR #1198:
URL: https://github.com/apache/iceberg-cpp/pull/1198#discussion_r4752605700
##########
src/iceberg/puffin/puffin_format.cc:
##########
@@ -69,8 +89,32 @@ Result<std::vector<std::byte>>
Decompress(PuffinCompressionCodec codec,
return std::vector<std::byte>(input.begin(), input.end());
case PuffinCompressionCodec::kLz4:
return NotSupported("LZ4 decompression is not yet supported");
- case PuffinCompressionCodec::kZstd:
- return NotSupported("Zstd decompression is not yet supported");
+ case PuffinCompressionCodec::kZstd: {
+ const uint64_t frame_size = ZSTD_getFrameContentSize(input.data(),
input.size());
Review Comment:
Could we reject zstd skippable frames and add regression tests for
standalone and trailing skippable frames? `ZSTD_getFrameContentSize()` returns
zero for them, and `ZSTD_decompress()` silently skips them, so this currently
succeeds. I checked Iceberg Java: it rejects both cases. Puffin specifies a
single Zstandard compression frame with content size present.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]