anchor.diff:          0x65,
           0x61,
           0x45
  -      ];
  -      final buffer = typed.Uint8Buffer();
  -      buffer.addAll(values);
  -      output.putBytes(buffer);
  -      final input = cbor.Input(output.getData());
  -      final decoder = cbor.Decoder.withListener(input, listener);
  -      decoder.run();
  -      expect(listener.lastValue,
  -          ['a', 'A', 'b', 'B', 'c', 'C', 'd', 'D', 'e', 'E']);
  -      expect(listener.lastSize, 5);
  -      decoder.listener = slistener;
  -      input.reset();
  -      slistener.itemStack.clear();
  -      decoder.run();
  -      final decodeStack = cbor.DecodeStack();
  -      decodeStack.build(slistener.itemStack);
  -      final slist = decodeStack.walk();
  -      expect(slist, isNotNull);
  -      expect(slist!.length, 1);
  -      expect(slist[0], {'a': 'A', 'b': 'B', 'c': 'C', 'd': 'D', 'e': 'E'});
  +      ]);
  +      expect(decoded, {
  +        CborString('a'): CborString('A'),
  +        CborString('b'): CborString('B'),
  +        CborString('c'): CborString('C'),
  +        CborString('d'): CborString('D'),
  +        CborString('e'): CborString('E'),
  +      });
       });
   
       test("(_ h'0102', h'030405')", () {
  -      output.clear();
  -      listener.clear();
  -      final values = [0x5f, 0x42, 0x01, 0x02, 0x43, 0x03, 0x04, 0x05, 0xff];
  -      final buffer = typed.Uint8Buffer();
  -      buffer.addAll(values);
  -      output.putBytes(buffer);
  -      final input = cbor.Input(output.getData());
  -      final decoder = cbor.Decoder.withListener(input, listener);
  -      decoder.run();
  -      expect(listener.lastValue, [
  -        [1, 2],
  -        [3, 4, 5]
  -      ]);
  -      expect(listener.indefiniteStart, isTrue);
  -      decoder.listener = slistener;
  -      input.reset();
  -      slistener.itemStack.clear();
  -      decoder.run();
  -      final decodeStack = cbor.DecodeStack();
  -      decodeStack.build(slistener.itemStack);
  -      final slist = decodeStack.walk();
  -      expect(slist, isNotNull);
  -      expect(slist!.length, 1);
  -      expect(slist[0], [1, 2, 3, 4, 5]);
  +      final decoded =
  +          cbor.decode([0x5f, 0x42, 0x01, 0x02, 0x43, 0x03, 0x04, 0x05, 0xff]);
  +      expect(decoded, CborBytes([1, 2, 3, 4, 5]));
       });
   
       test('(_ "strea", "ming")', () {
  -      output.clear();
  -      listener.clear();
  -      final values = [
  +      final decoded = cbor.decode([
           0x7f,
           0x65,
           0x73,
  
positive.code:         0x18,
          0x18,
          0x19
        ];
        final buffer = typed.Uint8Buffer();
        buffer.addAll(values);
        output.putBytes(buffer);
        final input = cbor.Input(output.getData());
        final decoder = cbor.Decoder.withListener(input, listener);
        decoder.run();
        expect(listener.lastValue, [
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20,
          21,
          22,
          23,
          24,
          25
        ]);
        expect(listener.lastSize, 25);
        decoder.listener = slistener;
        input.reset();
        slistener.itemStack.clear();
        decoder.run();
        final decodeStack = cbor.DecodeStack();
        decodeStack.build(slistener.itemStack);
        final slist = decodeStack.walk();
        expect(slist, isNotNull);
        expect(slist!.length, 1);
        expect(slist[0], [
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20,
          21,
          22,
          23,
          24,
          25
        ]);
      });
  
      test('Nested array', () {
        output.clear();
        listener.clear();
        final values = [0x83, 0x01, 0x82, 0x02, 0x03, 0x82, 0x04, 0x05];
        final buffer = typed.Uint8Buffer();
        buffer.addAll(values);
        output.putBytes(buffer);
        final input = cbor.Input(output.getData());
        final decoder = cbor.Decoder.withListener(input, listener);
        decoder.run();
        expect(listener.lastValue, [1, 2, 3, 4, 5]);
        expect(listener.lastSize, 2);
        decoder.listener = slistener;
        input.reset();
        slistener.itemStack.clear();
        decoder.run();
        final decodeStack = cbor.DecodeStack();
        decodeStack.build(slistener.itemStack);
        final slist = decodeStack.walk();
        expect(slist, isNotNull);
        expect(slist!.length, 1);
        expect(slist[0], [
          1,
          [2, 3],
          [4, 5]
        ]);
      });
  
      test('Empty Map', () {
        output.clear();
        listener.clear();
        final values = [0xa0];
        final buffer = typed.Uint8Buffer();
        buffer.addAll(values);
        output.putBytes(buffer);
        final input = cbor.Input(output.getData());
        final decoder = cbor.Decoder.withListener(input, listener);
        decoder.run();
        expect(listener.lastValue, []);
        expect(listener.lastSize, 0);
        decoder.listener = slistener;
        input.reset();
        slistener.itemStack.clear();
        decoder.run();
        final decodeStack = cbor.DecodeStack();
        decodeStack.build(slistener.itemStack);
        final slist = decodeStack.walk();
        expect(slist, isNotNull);
        expect(slist!.length, 1);
        expect(slist[0], {});
      });
  
      test('{1: 2, 3: 4}', () {
        output.clear();
        listener.clear();
        final values = [0xa2, 0x01, 0x02, 0x03, 0x04];
        final buffer = typed.Uint8Buffer();
        buffer.addAll(values);
        output.putBytes(buffer);
        final input = cbor.Input(output.getData());
        final decoder = cbor.Decoder.withListener(input, listener);
        decoder.run();
        expect(listener.lastValue, [1, 2, 3, 4]);
        expect(listener.lastSize, 2);
        decoder.listener = slistener;
        input.reset();
        slistener.itemStack.clear();
        decoder.run();
        final decodeStack = cbor.DecodeStack();
        decodeStack.build(slistener.itemStack);
        final slist = decodeStack.walk();
        expect(slist, isNotNull);
        expect(slist!.length, 1);
        expect(slist[0], {1: 2, 3: 4});
      });
  
      test('{"a": 1, "b": [2, 3]}', () {
        output.clear();
        listener.clear();
        final values = [0xa2, 0x61, 0x61, 0x01, 0x61, 0x62, 0x82, 0x02, 0x03];
        final buffer = typed.Uint8Buffer();
        buffer.addAll(values);
        output.putBytes(buffer);
        final input = cbor.Input(output.getData());
        final decoder = cbor.Decoder.withListener(input, listener);
        decoder.run();
        expect(listener.lastValue, ['a', 1, 'b', 2, 3]);
        expect(listener.lastSize, 2);
        decoder.listener = slistener;
        input.reset();
        slistener.itemStack.clear();
        decoder.run();
        final decodeStack = cbor.DecodeStack();
        decodeStack.build(slistener.itemStack);
        final slist = decodeStack.walk();
        expect(slist, isNotNull);
        expect(slist!.length, 1);
        expect(slist[0], {
          'a': 1,
          'b': [2, 3]
        });
      });
  
      test('["a", {"b": "c"}]', () {
        output.clear();
        listener.clear();
        final values = [0x82, 0x61, 0x61, 0xa1, 0x61, 0x62, 0x61, 0x63];
        final buffer = typed.Uint8Buffer();
        buffer.addAll(values);
        output.putBytes(buffer);
        final input = cbor.Input(output.getData());
        final decoder = cbor.Decoder.withListener(input, listener);
        decoder.run();
        expect(listener.lastValue, ['a', 'b', 'c']);
        expect(listener.lastSize, 1);
        decoder.listener = slistener;
        input.reset();
        slistener.itemStack.clear();
        decoder.run();
        final decodeStack = cbor.DecodeStack();
        decodeStack.build(slistener.itemStack);
        final slist = decodeStack.walk();
        expect(slist, isNotNull);
        expect(slist!.length, 1);
        expect(slist[0], [
          'a',
          {'b': 'c'}
        ]);
      });
  
      test('{"a": "A", "b": "B", "c": "C", "d": "D", "e": "E"}', () {
        output.clear();
        listener.clear();
        final values = [
          0xa5,
          0x61,
          0x61,
  
negative.code:         0x63,
          0x6f,
          0x6d
        ]);
        expect(decoded, CborUri.fromString('http://www.example.com'));
      });
  
      test('Empty single quotes', () {
        final decoded = cbor.decode([0x40]);
        expect(decoded, CborBytes([]));
      });
  
      test('4 bytes', () {
        final decoded = cbor.decode([0x44, 0x01, 0x02, 0x03, 0x04]);
        expect(decoded, CborBytes([01, 02, 03, 04]));
      });
  
      test('Empty double quotes', () {
        final decoded = cbor.decode([0x60]);
        expect(decoded, CborString(''));
      });
  
      test('a', () {
        final decoded = cbor.decode([0x61, 0x61]);
        expect(decoded, CborString('a'));
      });
  
      test('IETF', () {
        final decoded = cbor.decode([0x64, 0x49, 0x45, 0x54, 0x46]);
        expect(decoded, CborString('IETF'));
      });
  
      test('Quoted backslash', () {
        final decoded = cbor.decode([0x62, 0x22, 0x5c]);
        expect(decoded, CborString('"\\'));
      });
  
      test('Unicode ü', () {
        final decoded = cbor.decode([0x62, 0xc3, 0xbc]);
        expect(decoded, CborString('ü'));
      });
  
      test('Unicode 水', () {
        final decoded = cbor.decode([0x63, 0xe6, 0xb0, 0xb4]);
        expect(decoded, CborString('水'));
      });
  
      test('Unicode 𐅑', () {
        final decoded = cbor.decode([0x64, 0xf0, 0x90, 0x85, 0x91]);
        expect(decoded, CborString('𐅑'));
      });
  
      test('Array empty', () {
        final decoded = cbor.decode([0x80]);
        expect(decoded, []);
      });
  
      test('Array 1,2,3', () {
        final decoded = cbor.decode([0x83, 0x01, 0x02, 0x03]);
        expect(decoded, [CborSmallInt(1), CborSmallInt(2), CborSmallInt(3)]);
      });
  
      test('Array 1,2,3...25', () {
        final decoded = cbor.decode([
          0x98,
          0x19,
          0x01,
  