Documentation
¶
Overview ¶
Package crunched provides the Data interface. Implementations of this interface can store data in a crunched and uncrunched state.
The intention is that implementations crunch data after a call to Snapshot() and transparently uncrunch it on a call to Data().
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data interface {
// IsCrunched returns true if data is currently crunched
IsCrunched() bool
// Size returns the uncrunched size and the current size of the data. If the
// data is currently crunched then the two values will be the same
Size() (int, int)
// Data returns a pointer to the uncrunched data
Data() *[]byte
// Snapshot makes a copy of the data and crunching it if required. The data will
// be uncrunched automatically when Data() function is called
Snapshot() Data
}
Data provides the interface to a crunched data type
type Inspection ¶
type Inspection interface {
Data
// Inspect returns data in the current state. In other words, the data will
// not be decrunched as it would be with the Data() function
Inspect() *[]byte
}
Inspection provides the interface to the crunched data type and provides the ability to inspect the data in its current form
Click to show internal directories.
Click to hide internal directories.