| 655 | // ObjectWriter/flatbuffers uses fixed size integers instead of variable size. |
| 656 | |
| 657 | Value serializeIndexBlock(Standalone<IndexedBlobGranuleFile>& file, Optional<BlobGranuleCipherKeysCtx> cipherKeysCtx) { |
| 658 | file.indexBlockRef.finalize(cipherKeysCtx, file.arena()); |
| 659 | |
| 660 | Value serialized = ObjectWriter::toValue(file, IncludeVersion(ProtocolVersion::withBlobGranuleFile())); |
| 661 | file.chunkStartOffset = serialized.contents().size(); |
| 662 | |
| 663 | if (BG_ENCRYPT_COMPRESS_DEBUG) { |
| 664 | TraceEvent(SevDebug, "SerializeIndexBlock").detail("StartOffset", file.chunkStartOffset); |
| 665 | } |
| 666 | |
| 667 | return ObjectWriter::toValue(file, IncludeVersion(ProtocolVersion::withBlobGranuleFile())); |
| 668 | } |
| 669 | |
| 670 | Value serializeFileFromChunks(Standalone<IndexedBlobGranuleFile>& file, |
| 671 | Optional<BlobGranuleCipherKeysCtx> cipherKeysCtx, |
no test coverage detected