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 c178a72 commit efc46e6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions array.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,9 +534,9 @@ func newArrayDataSlabFromDataV1(
// version 1 with CBOR tag having tag number CBORTagInlinedArray, and tag contant
// as 3-element array:
//
// - index of inlined extra data
// - value ID index
// - CBOR array of elements
// +------------------+----------------+----------+
// | extra data index | value ID index | elements |
// +------------------+----------------+----------+
//
// NOTE: This function doesn't decode tag number because tag number is decoded
// in the caller and decoder only contains tag content.
Expand Down Expand Up @@ -641,9 +641,9 @@ func DecodeInlinedArrayStorable(
// version 1 with CBOR tag having tag number CBORTagInlinedArray,
// and tag contant as 3-element array:
//
// - index of inlined extra data
// - value ID index
// - CBOR array of elements
// +------------------+----------------+----------+
// | extra data index | value ID index | elements |
// +------------------+----------------+----------+
func (a *ArrayDataSlab) encodeAsInlined(enc *Encoder, inlinedTypeInfo *inlinedExtraData) error {
if a.extraData == nil {
return NewEncodingError(
Expand Down
12 changes: 6 additions & 6 deletions map.go
Original file line number Diff line number Diff line change
Expand Up @@ -2507,9 +2507,9 @@ func DecodeInlinedCompositeStorable(
// version 1 with CBOR tag having tag number CBORTagInlinedMap, and tag contant
// as 3-element array:
//
// - index of inlined extra data
// - value ID index
// - CBOR array of elements
// +------------------+----------------+----------+
// | extra data index | value ID index | elements |
// +------------------+----------------+----------+
//
// NOTE: This function doesn't decode tag number because tag number is decoded
// in the caller and decoder only contains tag content.
Expand Down Expand Up @@ -2741,9 +2741,9 @@ func (m *MapDataSlab) encodeElements(enc *Encoder, inlinedTypes *inlinedExtraDat
// version 1 with CBOR tag having tag number CBORTagInlinedMap,
// and tag contant as 3-element array:
//
// - index of inlined extra data
// - value ID index
// - CBOR array of elements
// +------------------+----------------+----------+
// | extra data index | value ID index | elements |
// +------------------+----------------+----------+
func (m *MapDataSlab) encodeAsInlined(enc *Encoder, inlinedTypeInfo *inlinedExtraData) error {
if m.extraData == nil {
return NewEncodingError(
Expand Down

0 comments on commit efc46e6

Please sign in to comment.