diff options
Diffstat (limited to 'pkg/classes/stop.go')
| -rw-r--r-- | pkg/classes/stop.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pkg/classes/stop.go b/pkg/classes/stop.go new file mode 100644 index 0000000..753be19 --- /dev/null +++ b/pkg/classes/stop.go | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | package classes | ||
| 2 | |||
| 3 | import ( | ||
| 4 | "github.com/pektezol/bitreader" | ||
| 5 | "github.com/pektezol/demoparser/pkg/writer" | ||
| 6 | ) | ||
| 7 | |||
| 8 | type Stop struct { | ||
| 9 | RemainingData []byte | ||
| 10 | } | ||
| 11 | |||
| 12 | func (stop *Stop) ParseStop(reader *bitreader.Reader) { | ||
| 13 | if reader.TryReadBool() { | ||
| 14 | stop.RemainingData = reader.TryReadBitsToSlice(uint64(reader.TryReadRemainingBits())) | ||
| 15 | writer.AppendLine("\tRemaining Data: %v", stop.RemainingData) | ||
| 16 | } | ||
| 17 | } | ||