diff options
| author | tv <tv@krebsco.de> | 2026-11-05 04:00:14 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-05 04:00:14 +0100 |
| commit | f0ef5c33998964d21c5cf5c582cd194327429003 (patch) | |
| tree | 726357c373a0145716f1ee0ec00bfd769b5a934b /src/transport/mod.rs | |
| parent | f7ce22ed0ba4a758bdc7de0f21b6d0cb45a866b1 (diff) | |
deflate blob chunks
Diffstat (limited to 'src/transport/mod.rs')
| -rw-r--r-- | src/transport/mod.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/transport/mod.rs b/src/transport/mod.rs index 1e9e5a9..eeb9d34 100644 --- a/src/transport/mod.rs +++ b/src/transport/mod.rs @@ -322,6 +322,13 @@ pub(crate) enum BlobBody { }, /// The sender doesn't have the blob. Missing, + /// A chunk, deflated (`compress`): the receiver inflates it to the chunk, which the + /// manifest's hash is of, whoever sent it. + DeflatedChunk { + index: u32, + #[serde(with = "crate::transport::wire::codec::shared_bytes")] + data: bytes::Bytes, + }, } /// Sizes instead of contents: logged messages stay short. @@ -349,6 +356,11 @@ impl std::fmt::Debug for BlobBody { .field("bytes", &data.len()) .finish(), BlobBody::Missing => f.write_str("Missing"), + BlobBody::DeflatedChunk { index, data } => f + .debug_struct("DeflatedChunk") + .field("index", index) + .field("bytes", &data.len()) + .finish(), } } } |
