Skip to content

Commit

Permalink
Update comments about encoding format
Browse files Browse the repository at this point in the history
  • Loading branch information
fxamacker committed Sep 19, 2023
1 parent 399684a commit c178a72
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 39 deletions.
28 changes: 8 additions & 20 deletions array.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,17 +419,11 @@ func newArrayDataSlabFromDataV0(

// newArrayDataSlabFromDataV1 decodes data in version 1:
//
// Root DataSlab Header:
//
// +-------------------------------+------------+---------------------------------+
// | slab version + flag (2 bytes) | extra data | inlined extra data (if present) |
// +-------------------------------+------------+---------------------------------+
//
// Non-root DataSlab Header:
// DataSlab Header:
//
// +-------------------------------+---------------------------------+-----------------------------+
// | slab version + flag (2 bytes) | inlined extra data (if present) | next slab ID (if non-empty) |
// +-------------------------------+---------------------------------+-----------------------------+
// +-------------------------------+----------------------+---------------------------------+-----------------------------+
// | slab version + flag (2 bytes) | extra data (if root) | inlined extra data (if present) | next slab ID (if non-empty) |
// +-------------------------------+----------------------+---------------------------------+-----------------------------+
//
// Content:
//
Expand Down Expand Up @@ -713,17 +707,11 @@ func (a *ArrayDataSlab) encodeAsInlined(enc *Encoder, inlinedTypeInfo *inlinedEx

// Encode encodes this array data slab to the given encoder.
//
// Root DataSlab Header:
//
// +-------------------------------+------------+---------------------------------+
// | slab version + flag (2 bytes) | extra data | inlined extra data (if present) |
// +-------------------------------+------------+---------------------------------+
//
// Non-root DataSlab Header:
// DataSlab Header:
//
// +-------------------------------+---------------------------------+-----------------------------+
// | slab version + flag (2 bytes) | inlined extra data (if present) | next slab ID (if non-empty) |
// +-------------------------------+---------------------------------+-----------------------------+
// +-------------------------------+----------------------+---------------------------------+-----------------------------+
// | slab version + flag (2 bytes) | extra data (if root) | inlined extra data (if present) | next slab ID (if non-empty) |
// +-------------------------------+----------------------+---------------------------------+-----------------------------+
//
// Content:
//
Expand Down
26 changes: 7 additions & 19 deletions map.go
Original file line number Diff line number Diff line change
Expand Up @@ -2268,17 +2268,11 @@ func newMapDataSlabFromDataV0(

// newMapDataSlabFromDataV1 decodes data in version 1:
//
// Root DataSlab Header:
//
// +-------------------------------+------------+---------------------------------+
// | slab version + flag (2 bytes) | extra data | inlined extra data (if present) |
// +-------------------------------+------------+---------------------------------+
//
// Non-root DataSlab Header:
// DataSlab Header:
//
// +-------------------------------+---------------------------------+-----------------------------+
// | slab version + flag (2 bytes) | inlined extra data (if present) | next slab ID (if non-empty) |
// +-------------------------------+---------------------------------+-----------------------------+
// +-------------------------------+----------------------+---------------------------------+-----------------------------+
// | slab version + flag (2 bytes) | extra data (if root) | inlined extra data (if present) | next slab ID (if non-empty) |
// +-------------------------------+----------------------+---------------------------------+-----------------------------+
//
// Content:
//
Expand Down Expand Up @@ -2610,15 +2604,9 @@ func DecodeInlinedMapStorable(
//
// Root DataSlab Header:
//
// +-------------------------------+------------+---------------------------------+
// | slab version + flag (2 bytes) | extra data | inlined extra data (if present) |
// +-------------------------------+------------+---------------------------------+
//
// Non-root DataSlab Header:
//
// +-------------------------------+---------------------------------+-----------------------------+
// | slab version + flag (2 bytes) | inlined extra data (if present) | next slab ID (if non-empty) |
// +-------------------------------+---------------------------------+-----------------------------+
// +-------------------------------+----------------------+---------------------------------+-----------------------------+
// | slab version + flag (2 bytes) | extra data (if root) | inlined extra data (if present) | next slab ID (if non-empty) |
// +-------------------------------+----------------------+---------------------------------+-----------------------------+
//
// Content:
//
Expand Down

0 comments on commit c178a72

Please sign in to comment.