Documentation ¶
Overview ¶
Package ogórek is a library for decoding Python's pickle format.
ogórek is Polish for "pickle".
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidPickleVersion = errors.New("invalid pickle version")
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder is a decoder for pickle streams.
func NewDecoder ¶
NewDecoder constructs a new Decoder which will decode the pickle stream in r.
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
An Encoder encodes Go data structures into pickle byte stream
func NewEncoder ¶
NewEncoder returns a new Encoder struct with default values
type OpcodeError ¶
OpcodeError is the error that Decode returns when it sees unknown pickle opcode.
func (OpcodeError) Error ¶
func (e OpcodeError) Error() string
type Ref ¶
type Ref struct { // persistent ID of referenced object. // // used to be string for protocol 0, but "upgraded" to be arbitrary // object for later protocols. Pid interface{} }
Ref represents Python's persistent reference.
Such references are used when one pickle somehow references another pickle in e.g. a database.
See https://docs.python.org/3/library/pickle.html#pickle-persistent for details.
Click to show internal directories.
Click to hide internal directories.