Documentation
¶
Overview ¶
Package gdio provides a type Decenc of decryption/encryption contexts to process encoded data of save files of Grim Dawn game. Such a context is supposed to be "grown" from a "seed" (which can usually be found in the beginning of a save file of interest) with function New and, after that, supplied to low-level routines of subpackages [pop] and [push] to obtain or encode values.
Index ¶
Constants ¶
const Version = "v1.0.0"
Version of the library
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decenc ¶
type Decenc struct {
// State is current state of the context, either obtained through
// transformation method or installed directly
State uint32
// Data is a slice of raw bytes of encoded values. The bytes are always
// supposed to be in little endian order. External routines can "pop"
// bytes from the slice (almost in terms of a queue) or "push" bytes of
// some encoded values to it (stack-like). The data is opened to any
// transformation or replace, but it is supposed to have a continuous
// history.
Data []byte
// Err is an error value, currently saved within the context
Err error
// contains filtered or unexported fields
}
Decenc is a type of decoding/encoding contexts, which encapsulate three pretty independent aspects:
- a kind of state along with transformation rules, "grown" from a "seed";
- a slice of encoded data, allowing to pop values from it to decode or push encoded values to it;
- an error to signal a problem within a particular process along with ability to "halt" the context.
The aspects have been combined in the contexts, because they are supposed to be universal input/output entities, supplied to and thrown between different processes. The processes vary from low-level (to decode an unsigned 32-bit integer from the data) to high-level (say, to encode and push a block of stashes of a character to the context's data). Accordingly to that, the type provides direct access to some properties of the contexts (state of the context, data slice or current error value) to allow straightfoward transformation by the low-level facilities. It hides, nevertheless, the seed and the rules, as they aren't supposed to be accessed by any facility.
func New ¶
New takes a seed, "grows" transformation rules and a state from the seed, and returns a pointer to a decoding/encoding context with the data saved within
func (*Decenc) Halt ¶
Halt saves the provided error, if an error has yet to be saved within the context, or does nothing otherwise
Directories
¶
| Path | Synopsis |
|---|---|
|
Package pop provides low-level routines to decode values from save files of Grim Dawn.
|
Package pop provides low-level routines to decode values from save files of Grim Dawn. |
|
Package push provides low-level routines to encode values accordingly to the format of save files of Grim Dawn.
|
Package push provides low-level routines to encode values accordingly to the format of save files of Grim Dawn. |