Documentation ¶
Index ¶
- func Compress(data string) (string, error)
- func Decompress(data string) (string, error)
- type DataTypes
- type FileCache
- type GabagoolFile
- func (g *GabagoolFile) CreateAndSave(path string, dataType DataTypes, data []byte) error
- func (g *GabagoolFile) CreateFile(dataType DataTypes, data []byte) (*GabagoolFile, error)
- func (g *GabagoolFile) Open(path string) (*GabagoolFile, error)
- func (g *GabagoolFile) OpenWithBitPacking(path string) (*GabagoolFile, error)
- func (g *GabagoolFile) ParseFile(path string) (*GabagoolFile, error)
- func (g *GabagoolFile) Save(path string, file *GabagoolFile) error
- func (g *GabagoolFile) SaveWithBitPacking(path string, file *GabagoolFile) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decompress ¶ added in v0.0.3
Types ¶
type FileCache ¶
type FileCache struct { Path string FileData GabagoolFile }
Cache of the last file opened, usefull for saving on syscalls
This is an internal component and should not be used directly ¶
type GabagoolFile ¶
type GabagoolFile struct { Header uint64 // header for veryfying the file Timestamp uint64 // timestamp when the file was created Hash []byte // sha256 hash of the data in the file DataType DataTypes // type of the data stored in the file Length uint32 // length of the data section Data []byte // data stored }
Structure of the Gabagool™️ file, also houses all of it's methods
func (*GabagoolFile) CreateAndSave ¶
func (g *GabagoolFile) CreateAndSave(path string, dataType DataTypes, data []byte) error
The same as calling CreateFile() followed by Save()
func (*GabagoolFile) CreateFile ¶
func (g *GabagoolFile) CreateFile(dataType DataTypes, data []byte) (*GabagoolFile, error)
Creates a new file with the data provided and returns it for use
func (*GabagoolFile) Open ¶
func (g *GabagoolFile) Open(path string) (*GabagoolFile, error)
Opens the files from the provided path and returns it
func (*GabagoolFile) OpenWithBitPacking ¶ added in v0.0.2
func (g *GabagoolFile) OpenWithBitPacking(path string) (*GabagoolFile, error)
SaveWithBitPacking opens a bit packed gabagool file
func (*GabagoolFile) ParseFile ¶
func (g *GabagoolFile) ParseFile(path string) (*GabagoolFile, error)
Same as Open() with extra checks to make sure the file is valid
func (*GabagoolFile) Save ¶
func (g *GabagoolFile) Save(path string, file *GabagoolFile) error
Saves the file to the provided path
func (*GabagoolFile) SaveWithBitPacking ¶ added in v0.0.2
func (g *GabagoolFile) SaveWithBitPacking(path string, file *GabagoolFile) error
SaveWithBitPacking saves the gabagool file with bit packing
admitedly does not seem to do anything
Click to show internal directories.
Click to hide internal directories.