Add read_u24be etc methods

Fixes #12
This commit is contained in:
Nigel Tao committed 2018-06-02 13:03:24 +10:00
1 parent 9f994948df
commit 20e459cfb2
9 files changed
+195 -72

No files matched your search

+4
View File
@@ -39,7 +39,11 @@ var (
zero = big.NewInt(+0)
one = big.NewInt(+1)
two = big.NewInt(+2)
three = big.NewInt(+3)
four = big.NewInt(+4)
five = big.NewInt(+5)
six = big.NewInt(+6)
seven = big.NewInt(+7)
eight = big.NewInt(+8)
sixteen = big.NewInt(+16)
thirtyTwo = big.NewInt(+32)
+8
View File
@@ -282,8 +282,16 @@ func ioMethodAdvance(x t.ID) *big.Int {
return one
case t.IDReadU16BE, t.IDReadU16LE, t.IDWriteU16BE, t.IDWriteU16LE:
return two
case t.IDReadU24BE, t.IDReadU24LE, t.IDWriteU24BE, t.IDWriteU24LE:
return three
case t.IDReadU32BE, t.IDReadU32LE, t.IDWriteU32BE, t.IDWriteU32LE:
return four
case t.IDReadU40BE, t.IDReadU40LE, t.IDWriteU40BE, t.IDWriteU40LE:
return five
case t.IDReadU48BE, t.IDReadU48LE, t.IDWriteU48BE, t.IDWriteU48LE:
return six
case t.IDReadU56BE, t.IDReadU56LE, t.IDWriteU56BE, t.IDWriteU56LE:
return seven
case t.IDReadU64BE, t.IDReadU64LE, t.IDWriteU64BE, t.IDWriteU64LE:
return eight
}