1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-12-24 11:06:51 -05:00

d2common/d2datautils/StreamWriter: add Offset method

This commit is contained in:
gucio321 2021-05-18 19:51:03 +02:00
parent 1224a38796
commit 30c56d274c

View File

@ -26,6 +26,11 @@ func (v *StreamWriter) GetBytes() []byte {
return v.data.Bytes()
}
// Offset returns current bit offset
func (v *StreamWriter) Offset() int {
return v.bitOffset
}
// PushBytes writes a bytes to the stream
func (v *StreamWriter) PushBytes(b ...byte) {
for _, i := range b {