io: refactoring for using WriteVarBytes instead of WriteLE
goal is to be consistent with C# implementation. For writing []byte WriteBytes used and for byte - WriteVarByte.
This commit is contained in:
parent
d02673c112
commit
03ff2976ed
20 changed files with 33 additions and 34 deletions
|
@ -177,8 +177,7 @@ func dumpDB(ctx *cli.Context) error {
|
|||
buf := io.NewBufBinWriter()
|
||||
b.EncodeBinary(buf.BinWriter)
|
||||
bytes := buf.Bytes()
|
||||
writer.WriteLE(uint32(len(bytes)))
|
||||
writer.WriteLE(bytes)
|
||||
writer.WriteVarBytes(bytes)
|
||||
if writer.Err != nil {
|
||||
return cli.NewExitError(err, 1)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue