40 static constexpr std::array<uint8_t, 4> kMagicV1 = {0x50, 0x46, 0x41, 0x31};
42 static constexpr int32_t kMagicLength = 4;
43 static constexpr int32_t kFooterStartMagicOffset = 0;
44 static constexpr int32_t kFooterStartMagicLength = kMagicLength;
45 static constexpr int32_t kFooterStructPayloadSizeOffset = 0;
46 static constexpr int32_t kFooterStructFlagsOffset = kFooterStructPayloadSizeOffset + 4;
47 static constexpr int32_t kFooterStructFlagsLength = 4;
48 static constexpr int32_t kFooterStructMagicOffset =
49 kFooterStructFlagsOffset + kFooterStructFlagsLength;
52 static constexpr int32_t kFooterStructLength = kFooterStructMagicOffset + kMagicLength;
56 PuffinCompressionCodec::kLz4;
73 std::span<const std::byte> input);
Define symbol visibility macros for core Iceberg APIs.
Puffin file metadata, reader, and writer APIs.
Definition file_metadata.h:35
PuffinFlag
Footer flags for Puffin files.
Definition puffin_format.h:60
@ kFooterPayloadCompressed
Whether the footer payload is compressed.
PuffinCompressionCodec
Compression codecs supported by Puffin files.
Definition file_metadata.h:38
ICEBERG_EXPORT Result< std::vector< std::byte > > Decompress(PuffinCompressionCodec codec, std::span< const std::byte > input)
Decompress data using the specified codec.
ICEBERG_EXPORT bool IsFlagSet(std::span< const uint8_t, 4 > flags, PuffinFlag flag)
Check if a flag is set in the flags bytes.
ICEBERG_EXPORT void SetFlag(std::span< uint8_t, 4 > flags, PuffinFlag flag)
Set a flag in the flags bytes.
ICEBERG_EXPORT Result< std::vector< std::byte > > Compress(PuffinCompressionCodec codec, std::span< const std::byte > input)
Compress data using the specified codec.
std::expected< T, E > Result
Result alias.
Definition result.h:88
Define Result, Status, and error helpers.