mirror of
https://github.com/jwetzell/psn-go.git
synced 2026-08-17 21:24:17 +00:00
30 lines
519 B
Go
30 lines
519 B
Go
package decoders
|
|
|
|
import (
|
|
"encoding/binary"
|
|
)
|
|
|
|
type DataTrackerTimestampChunkData struct {
|
|
Timestamp uint64
|
|
}
|
|
|
|
type DataTrackerTimestampChunk struct {
|
|
Chunk Chunk
|
|
Data DataTrackerTimestampChunkData
|
|
}
|
|
|
|
func DecodeDataTrackerTimestampChunk(bytes []byte) DataTrackerTimestampChunk {
|
|
chunk := DecodeChunk(bytes)
|
|
|
|
timestamp := binary.LittleEndian.Uint64(chunk.ChunkData[0:8])
|
|
|
|
data := DataTrackerTimestampChunkData{
|
|
Timestamp: timestamp,
|
|
}
|
|
|
|
return DataTrackerTimestampChunk{
|
|
Chunk: chunk,
|
|
Data: data,
|
|
}
|
|
}
|