Skip to content

Commit 5c722a0

Browse files
committed
various tweaks, new way to packing data
1 parent d55c624 commit 5c722a0

File tree

4 files changed

+166
-247
lines changed

4 files changed

+166
-247
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,10 @@ Usage
5050
import struct
5151
5252
# >>> pack('hhi', 1, 2, 3)
53-
var st = newStruct("hhi")
54-
var output = st.add(1.int16).add(2.int16).add(3.int32).pack()
53+
var output = pack("hhi", 1, 2, 3)
5554
5655
# alternative way to pack
57-
# output = pack("hhi", newStructShort(1), newStructShort(1), newStructInt(3))
56+
# output = pack("hhi", newStructInt(1), newStructInt(1), newStructInt(3))
5857
5958
# >>> unpack('hhi', '\x00\x01\x00\x02\x00\x00\x00\x03')
6059
var result = unpack("hhi", output);

0 commit comments

Comments
 (0)