Parse the 4-byte little-endian length prefix and return the total ciphertext size, including the 4-byte length field itself.
| 74 | /// Parse the 4-byte little-endian length prefix and return the total ciphertext size, |
| 75 | /// including the 4-byte length field itself. |
| 76 | int64_t ParseCiphertextTotalLength(const uint8_t* data, int64_t length) { |
| 77 | if (length < kCiphertextLengthSize) { |
| 78 | throw ParquetException("Ciphertext length buffer is too small"); |
| 79 | } |
| 80 | uint32_t buffer_size = |
| 81 | (static_cast<uint32_t>(data[3]) << 24) | (static_cast<uint32_t>(data[2]) << 16) | |
| 82 | (static_cast<uint32_t>(data[1]) << 8) | (static_cast<uint32_t>(data[0])); |
| 83 | return static_cast<int64_t>(buffer_size) + kCiphertextLengthSize; |
| 84 | } |
| 85 | |
| 86 | void CheckBloomFilterShortRead(int64_t expected, int64_t actual, |
| 87 | std::string_view context) { |
no test coverage detected