@@ -50,24 +50,24 @@ const CREATED_AT_SIZE: usize = 8;
5050/// PieceContent represents a piece metadata and piece content request.
5151///
5252/// Value Format:
53- /// - Metadata Length (8 bytes): Length of the metadata section.
53+ /// - Metadata Length (4 bytes): Length of the metadata section.
5454/// - Number (4 bytes): Piece number to download.
5555/// - Offset (8 bytes): Byte offset in the file.
5656/// - Length (8 bytes): Length of the piece in bytes.
57- /// - Digest Length (8 bytes): Length of the digest field (fixed at 32 bytes) .
58- /// - Digest (32 bytes ): CRC32 hash of the piece content.
59- /// - Parent ID Length (8 bytes): Length of the parent task identifier.
57+ /// - Digest Length (4 bytes): Length of the digest field.
58+ /// - Digest (variable ): CRC32 hash of the piece content.
59+ /// - Parent ID Length (4 bytes): Length of the parent task identifier.
6060/// - Parent ID (variable): Parent task identifier.
6161/// - Traffic Type (1 byte): Network traffic classification type.
62- /// - Cost (64 bytes): Download cost in seconds.
62+ /// - Cost (8 bytes): Download cost in seconds.
6363/// - Created At (8 bytes): Creation timestamp as Unix epoch seconds.
6464/// - Content (variable): Piece content bytes.
6565///
6666/// ```text
6767/// -------------------------------------------------------------------------------------------------------------------------------------
6868/// | Metadata Length (4 bytes) | Number (4 bytes) | Offset (8 bytes) | Length (8 bytes) | Digest Length(8 bytes) | Digest (variable) |
6969/// ------------------------------------------------------------------------------------------------------------------------------------------
70- /// | Parent ID Length(8 bytes) | Parent ID (variable) | Traffic Type (1 byte) | Cost (8 bytes) | Created At (8 bytes) | Content (variable) |
70+ /// | Parent ID Length(4 bytes) | Parent ID (variable) | Traffic Type (1 byte) | Cost (8 bytes) | Created At (8 bytes) | Content (variable) |
7171/// ------------------------------------------------------------------------------------------------------------------------------------------
7272/// ```
7373#[ derive( Debug , Clone ) ]
0 commit comments