Skip to main content

Module metadata

Module metadata 

Source
Expand description

Transfer metadata: file info, chunk plans and ETags.

These structures are serialized to JSON and exchanged through HEADER_FILE_META and the transfer manifest so that server and client agree on chunk boundaries and can validate resume offsets.

Structs§

ChunkMeta
One chunk of a file transfer.
ChunkRange
A contiguous byte range of a file: [start, end).
FileMeta
Metadata about a single file involved in a transfer.
TransferPlan
The full transfer plan for one file: chunk layout derived from size.

Functions§

base64_decode
Base64-decode input (standard alphabet, =/whitespace tolerated).
base64_encode
Base64-encode input (standard alphabet, = padding).
decode_file_meta
Parse FileMeta from the [HEADER_FILE_META] header.
decode_file_meta_header
Decode FileMeta from the [HEADER_FILE_META] header.
encode_file_meta
Serialize FileMeta for the [HEADER_FILE_META] header.
encode_file_meta_header
Encode FileMeta for the [HEADER_FILE_META] header.
etag_from_size_mtime
Compute a deterministic, content-independent ETag from size + mtime.
hex
Hex-encode a byte slice (lowercase, no prefix).