Skip to content

Commit

Permalink
Merge pull request #23 from Trilliant/feature/cbor_SizedArrayAndMap
Browse files Browse the repository at this point in the history
Support sized array and sized map.
  • Loading branch information
cowtowncoder authored Jun 28, 2016
2 parents f353219 + b6a63b9 commit 5de31af
Show file tree
Hide file tree
Showing 3 changed files with 645 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ public final class CBORConstants
*/

public final static int SUFFIX_INDEFINITE = 0x1F;
public final static int SUFFIX_UINT8_ELEMENTS = 0x18;
public final static int SUFFIX_UINT16_ELEMENTS = 0x19;
public final static int SUFFIX_UINT32_ELEMENTS = 0x1A;
public final static int SUFFIX_UINT64_ELEMENTS = 0x1B;

public final static int MASK_MAJOR_TYPE = 0xE0;

Expand All @@ -60,10 +64,10 @@ public final class CBORConstants
*/

public final static byte BYTE_ARRAY_INDEFINITE = (byte) (PREFIX_TYPE_ARRAY + SUFFIX_INDEFINITE);
public final static byte BYTE_OBJECT_INDEFINITE = (byte) (PREFIX_TYPE_OBJECT + SUFFIX_INDEFINITE);

// 2-element array commonly used (for big float, f.ex.)
public final static byte BYTE_ARRAY_2_ELEMENTS = (byte) (PREFIX_TYPE_ARRAY + 2);

public final static byte BYTE_OBJECT_INDEFINITE = (byte) (PREFIX_TYPE_OBJECT + SUFFIX_INDEFINITE);

public final static byte BYTE_FALSE = (byte) (PREFIX_TYPE_MISC + 20);
public final static byte BYTE_TRUE = (byte) (PREFIX_TYPE_MISC + 21);
Expand Down
Loading

0 comments on commit 5de31af

Please sign in to comment.