Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
og-rek
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
og-rek
Commits
43c00601
Commit
43c00601
authored
Nov 24, 2013
by
Damian Gryski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder: support opcodes the encoder produces
parent
66358694
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
ogórek.go
ogórek.go
+19
-2
No files found.
ogórek.go
View file @
43c00601
...
...
@@ -334,7 +334,13 @@ func (d *Decoder) loadLong() error {
// Push a 2-byte unsigned int
func
(
d
*
Decoder
)
loadBinInt2
()
error
{
return
errNotImplemented
var
u
uint16
err
:=
binary
.
Read
(
d
.
r
,
binary
.
LittleEndian
,
&
u
)
if
err
!=
nil
{
return
err
}
d
.
push
(
int64
(
u
))
return
nil
}
// Push None
...
...
@@ -388,7 +394,18 @@ func (d *Decoder) loadString() error {
}
func
(
d
*
Decoder
)
loadBinString
()
error
{
return
errNotImplemented
var
v
int32
err
:=
binary
.
Read
(
d
.
r
,
binary
.
LittleEndian
,
&
v
)
if
err
!=
nil
{
return
err
}
s
:=
make
([]
byte
,
v
)
_
,
err
=
io
.
ReadFull
(
d
.
r
,
s
)
if
err
!=
nil
{
return
err
}
d
.
push
(
string
(
s
))
return
nil
}
func
(
d
*
Decoder
)
loadShortBinString
()
error
{
...
...
Write
Preview
Markdown
is supported
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