From c178a72a6d9c28ba3846f2df06b27ac88ec1dc3b Mon Sep 17 00:00:00 2001 From: Faye Amacker <33205765+fxamacker@users.noreply.github.com> Date: Tue, 19 Sep 2023 11:17:55 -0500 Subject: [PATCH] Update comments about encoding format --- array.go | 28 ++++++++-------------------- map.go | 26 +++++++------------------- 2 files changed, 15 insertions(+), 39 deletions(-) diff --git a/array.go b/array.go index 4ec8bdcf..7d625a6d 100644 --- a/array.go +++ b/array.go @@ -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: // @@ -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: // diff --git a/map.go b/map.go index 42dbc4da..243c51d5 100644 --- a/map.go +++ b/map.go @@ -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: // @@ -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: //