diff options
| author | Per Larsson <[email protected]> | 2021-09-06 13:36:23 +0200 |
|---|---|---|
| committer | Per Larsson <[email protected]> | 2021-09-06 13:36:23 +0200 |
| commit | 482d8087c8522248f85c00233ab06a7ef6a34c55 (patch) | |
| tree | 754f7fb287cd6695e7ac2c765fe394ae79ae7fce /zenserver/compute/apply.cpp | |
| parent | Changed Jupiter endpoint to dev environment. (diff) | |
| parent | Merge branch 'main' of https://github.com/EpicGames/zen (diff) | |
| download | zen-482d8087c8522248f85c00233ab06a7ef6a34c55.tar.xz zen-482d8087c8522248f85c00233ab06a7ef6a34c55.zip | |
Merge branch 'main' of https://github.com/EpicGames/zen
Diffstat (limited to 'zenserver/compute/apply.cpp')
| -rw-r--r-- | zenserver/compute/apply.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/zenserver/compute/apply.cpp b/zenserver/compute/apply.cpp index ff90be9ec..939ac3362 100644 --- a/zenserver/compute/apply.cpp +++ b/zenserver/compute/apply.cpp @@ -428,17 +428,19 @@ HttpFunctionService::HttpFunctionService(CasStore& Store, CidStore& InCidStore, { ZEN_ASSERT(Attachment.IsBinary()); - const IoHash DataHash = Attachment.GetHash(); - SharedBuffer DataView = Attachment.AsBinary(); + const IoHash DataHash = Attachment.GetHash(); + CompressedBuffer DataView = Attachment.AsCompressedBinary(); - TotalAttachmentBytes += DataView.GetSize(); + TotalAttachmentBytes += DataView.GetCompressedSize(); ++AttachmentCount; - CasStore::InsertResult InsertResult = m_CasStore.InsertChunk(DataView.AsIoBuffer(), DataHash); + IoBuffer Payload = DataView.GetCompressed().Flatten().AsIoBuffer(); + + CasStore::InsertResult InsertResult = m_CasStore.InsertChunk(Payload, DataHash); if (InsertResult.New) { - TotalNewBytes += DataView.GetSize(); + TotalNewBytes += Payload.Size(); ++NewAttachmentCount; } } |