Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrWrongType = errors.New("wrong image type")
ErrWrongType is returned from [Opener].
Functions ¶
This section is empty.
Types ¶
type Extent ¶ added in v0.5.0
type Extent struct { // Offset from start of the image in bytes. Start int64 `json:"start"` // Length of this extent in bytes. Length int64 `json:"length"` // Set if this extent is allocated. Allocated bool `json:"allocated"` // Set if this extent is read as zeros. Zero bool `json:"zero"` // Set if this extent is compressed. Compressed bool `json:"compressed"` }
Extent describes a byte range in the image with the same allocation, compression, or zero status. Extents are aligned to the underlying file system block size (e.g. 4k), or the image format cluster size (e.g. 64k). One extent can describe one or more file system blocks or image clusters.
type Image ¶
type Image interface { io.ReaderAt io.Closer Extent(start, length int64) (Extent, error) Type() Type Size() int64 // -1 if unknown Readable() error }
Image implements io.ReaderAt and io.Closer.
type OpenWithType ¶
OpenWithType opens Image with the specified Type. Opener must return ErrWrongType when the image is not parsable with the specified Type.
Click to show internal directories.
Click to hide internal directories.