Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
gopub
bag
Commits
17fab235
Commit
17fab235
authored
4 years ago
by
Carsten Orthbandt
Browse files
Options
Download
Email Patches
Plain Diff
pack changes
parent
67ae0c0c
master
v0.0.6
v0.0.5
v0.0.4
v0.0.3
v0.0.2
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bytepack.go
+9
-1
bytepack.go
with
9 additions
and
1 deletion
+9
-1
bytepack.go
+
9
-
1
View file @
17fab235
...
...
@@ -12,10 +12,18 @@ type BytePack struct {
Endian
Endian
}
func
Pack
(
src
[]
byte
,
endian
Endian
)
BytePack
{
func
NewByte
Pack
(
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
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help