Skip to content

Commit

Permalink
various tweaks, new way to packing data
Browse files Browse the repository at this point in the history
  • Loading branch information
ba0f3 committed Sep 8, 2015
1 parent d55c624 commit 5c722a0
Show file tree
Hide file tree
Showing 4 changed files with 166 additions and 247 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@ Usage
import struct
# >>> pack('hhi', 1, 2, 3)
var st = newStruct("hhi")
var output = st.add(1.int16).add(2.int16).add(3.int32).pack()
var output = pack("hhi", 1, 2, 3)
# alternative way to pack
# output = pack("hhi", newStructShort(1), newStructShort(1), newStructInt(3))
# output = pack("hhi", newStructInt(1), newStructInt(1), newStructInt(3))
# >>> unpack('hhi', '\x00\x01\x00\x02\x00\x00\x00\x03')
var result = unpack("hhi", output);
Expand Down
Loading

0 comments on commit 5c722a0

Please sign in to comment.