| 1 |
package pack |
| 2 |
|
| 3 |
// Chain represents an element in the delta-base chain corresponding to a packed |
| 4 |
// object. |
| 5 |
type Chain interface { |
| 6 |
// Unpack unpacks the data encoded in the delta-base chain up to and |
| 7 |
// including the receiving Chain implementation by applying the |
| 8 |
// delta-base chain successively to itself. |
| 9 |
// |
| 10 |
// If there was an error in the delta-base resolution, i.e., the chain |
| 11 |
// is malformed, has a bad instruction, or there was a file read error, this |
| 12 |
// function is expected to return that error. |
| 13 |
// |
| 14 |
// In the event that a non-nil error is returned, it is assumed that the |
| 15 |
// unpacked data this function returns is malformed, or otherwise |
| 16 |
// corrupt. |
| 17 |
Unpack() ([]byte, error) |
| 18 |
|
| 19 |
// Type returns the type of the receiving chain element. |
| 20 |
Type() PackedObjectType |
| 21 |
} |