chore: Initial commit
This commit is contained in:
commit
cb32f24dfd
10 files changed
+694
No files matched your search
@@ -0,0 +1,42 @@
|
||||
package universe_io
|
||||
|
||||
type Source interface {
|
||||
Read(dst []byte) (n int, err error)
|
||||
}
|
||||
|
||||
type BufferedSource interface {
|
||||
Source
|
||||
|
||||
ReadByte() (byte, error)
|
||||
ReadUByte() (uint8, error)
|
||||
|
||||
ReadShortLE() (int16, error)
|
||||
ReadShortBE() (int16, error)
|
||||
ReadIntLE() (int32, error)
|
||||
ReadIntBE() (int32, error)
|
||||
ReadLongLE() (int64, error)
|
||||
ReadLongBE() (int64, error)
|
||||
|
||||
ReadUShortLE() (uint16, error)
|
||||
ReadUShortBE() (uint16, error)
|
||||
ReadUIntLE() (uint32, error)
|
||||
ReadUIntBE() (uint32, error)
|
||||
ReadULongLE() (uint64, error)
|
||||
ReadULongBE() (uint64, error)
|
||||
|
||||
ReadFloatLE() (float32, error)
|
||||
ReadFloatBE() (float32, error)
|
||||
ReadDoubleLE() (float64, error)
|
||||
ReadDoubleBE() (float64, error)
|
||||
|
||||
// ReadShortByteArray reads a size-prefixed byte array.
|
||||
// Structure: [ShortLE : size][size bytes data]
|
||||
ReadShortByteArray() ([]byte, error)
|
||||
|
||||
// ReadByteArray reads a size-prefixed byte array.
|
||||
// Structure: [IntLE : size][size bytes data]
|
||||
ReadByteArray() ([]byte, error)
|
||||
|
||||
ReadShortString() (string, error)
|
||||
ReadString() (string, error)
|
||||
}
|
||||
Reference in new issue
Block a user