diff --git a/tape/tag.go b/tape/tag.go index 9a89f38..f4001f2 100644 --- a/tape/tag.go +++ b/tape/tag.go @@ -2,14 +2,17 @@ package tape import "fmt" +// TODO: fix #7 + type Tag byte; const ( SI Tag = 0 << 5 // Small integer - LI Tag = 1 << 5 // Large integer - FP Tag = 2 << 5 // Floating point - SBA Tag = 3 << 5 // Small byte array - LBA Tag = 4 << 5 // Large byte array - OTA Tag = 5 << 5 // One-tag array - KTV Tag = 6 << 5 // Key-tag-value table + LI Tag = 1 << 5 // Large unsigned integer + LSI Tag = 2 << 5 // Large signed integer + FP Tag = 3 << 5 // Floating point + SBA Tag = 4 << 5 // Small byte array + LBA Tag = 5 << 5 // Large byte array + OTA Tag = 6 << 5 // One-tag array + KTV Tag = 7 << 5 // Key-tag-value table TNMask Tag = 0xE0 // The entire TN bitfield CNMask Tag = 0x1F // The entire CN bitfield CNLimit Tag = 32 // All valid CNs are < CNLimit @@ -40,6 +43,7 @@ func (tag Tag) String() string { switch tag.WithoutCN() { case SI: tn = "SI" case LI: tn = "LI" + case LSI: tn = "LSI" case FP: tn = "FP" case SBA: tn = "SBA" case LBA: tn = "LBA"