Commit 17fab235 authored by Carsten Orthbandt's avatar Carsten Orthbandt
Browse files

pack changes

No related merge requests found
Showing with 9 additions and 1 deletion
+9 -1
......@@ -12,10 +12,18 @@ type BytePack struct {
Endian Endian
}
func Pack(src []byte, endian Endian) BytePack {
func NewBytePack(src []byte, endian Endian) BytePack {
return BytePack{Src: src, Endian: endian}
}
func BytePackLE(src []byte) BytePack {
return BytePack{Src: src, Endian: EndianLE}
}
func BytePackBE(src []byte) BytePack {
return BytePack{Src: src, Endian: EndianBE}
}
func (p *BytePack) R(ofs int, d []byte) {
if ofs+len(d) > len(p.Src) {
return
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment