Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sizer ¶
type Sizer interface {
Size() int64
}
Sizer is an interface that shouldn't exist in a vacuum, but does because our other image formats follow a similar patten and need more information. A Sizer should return the true and final RAW size of the image and be callable before the first byte of data is written to the Writer. Note that our vimg.Builder implements this interface and is the intended argument in most cases.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer implements io.Closer, io.Writer, and io.Seeker interfaces. Creating an XVA image is as simple as getting one of these writers and copying a raw image into it.
func NewWriter ¶
NewWriter returns a Writer to which a RAW image can be copied in order to create an XVA format disk image. The Sizer 'h' must accurately return the true and final RAW size of the image.