anchor.diff:  }
   
   // Possible widths of #CBOR_TYPE_UINT items
  -enum cbor_int_width { cborInt8, cborInt16, cborInt32, cborInt64 }
  +enum CborIntWidth { cborInt8, cborInt16, cborInt32, cborInt64 }
   
   /// Possible widths of #CBOR_TYPE_FLOAT_CTRL items
  -enum cbor_float_width {
  +enum CborFloatWidth {
     cborFloat0, // Internal use - ctrl and special values
     cborFloat16, // Half float
     cborFloat32, // Single float
  
positive.code: }
  
  /// Possible decoding errors
  enum cbor_error_code {
    cborErrNone,
    cborErrNotEnoughData,
    cborErrNodata,
  
negative.code: }
  
  /// Metadata for dynamically sized types
  enum CborDstMetadata { cborMetaDataDefinate, cborMetaDataIndefinate }
  
  /// Semantic mapping for CTRL simple values
  enum _CborCtrl {
    cborCtrlNone,
    cborCtrlFalse,
    cborCtrlTrue,
    cborCtrlUndef,
    cborCtrlNull
  }
  
  const Map<List<int>, List<_CborCtrl>> cborCtrl = {
    0: _CborCtrl.cborCtrlNone.index,
    20: _CborCtrl.cborCtrlFalse.index,
    21: _CborCtrl.cborCtrlTrue.index,
    22: _CborCtrl.cborCtrlNull.index,
    23: _CborCtrl.cborCtrlUndef.index
  };
  
  /// Integers specific metadata
  class CborIntMetadata {
    CborIntWidth width;
  }
  
  /// Bytestrings specific metadata
  class CborBytestringMetadata {
    int length;
    CborDstMetadata type;
  }
  
  /// Strings specific metadata
  class CborStringMetadata {
    int length;
    int codepointCount; // Sum of chunks' codepoint_counts for indefinite strings
    CborDstMetadata type;
  }
  
  /// Arrays specific metadata
  class CborArrayMetadata {
    int allocated;
    int endPtr;
    CborDstMetadata type;
  }
  
  /// Maps specific metadata
  class CborMapMetadata {
    int allocated;
    int endPtr;
    CborDstMetadata type;
  }
  
  /// Tag specific metadata
  class CborTagMetadata {
    CborItem taggedItem;
    int value;
  }
  
  /// Floats specific metadata - includes CTRL values */
  class CborFloatCtrlMetadata {
    CborFloatWidth width;
    int ctrl;
  }
  
  //// Union of metadata across all possible types - discriminated in #CborItem */
  class CborItemMetadata {
    CborIntMetadata intMetadata;
    CborBytestringMetadata bytestringMetadata;
    CborStringMetadata stringMetadata;
    CborArrayMetadata arrayMetadata;
    CborMapMetadata mapMetadata;
    CborTagMetadata tagMetadata;
    CborFloatCtrlMetadata floatCtrlMetadata;
  }
  
  /// The item handle
  class CborItem {
  /** Discriminated by type */
    CborItemMetadata metadata;
  /** Reference count - initialize to 0 */
    int refcount;
  /** Major type discriminator */
    CborType type;
  /** Raw data block - interpretation depends on metadata */
    Uint8List data;
  }
  
  /** Defines cbor_item#data structure for indefinite strings and bytestrings
   *
   */
  class CborIndefiniteStringData {
    int chunkCount;
    int chunkCapacity;
    CborItem chunks;
  }
  
  /// High-level decoding error
  class CborError {
  /** Aproximate position */
    int position;
  /** Description */
    CborErrorCode code;
  }
  
  /// Simple pair of items for use in maps
  class CborPair {
    CborItem key, value;
  }
  
  /// High-level decoding result
  class CborLoadResult {
  /** Error indicator */
    CborError error;
  /** Number of bytes read*/
    int read;
  }
  
  /// Streaming decoder result - status
  enum CborDecoderStatus {
    cborDecoderFinished, // OK, finished
    cborDecoderNedata, // Not enough data - mismatch with MTB
    cborDecoderEbuffer, // Buffer manipulation problem
    cborDecoderError // Malformed or reserved MTB/value
  }
  
  /// Streaming decoder result
  class CborDecoderResult {
  /** Bytes read */
    int read;
  /** The result */
    CborDecoderStatus status;
  }
  