Documentation
¶
Index ¶
- func Available() bool
- func DecompressDCS(data []byte) ([]byte, error)
- func IsDCS(data []byte) bool
- type Compression
- type Decompressor
- type ProgressFunc
- type WIM
- func (w *WIM) Close()
- func (w *WIM) ExportImage(imageNum int, dest *WIM, compression Compression) error
- func (w *WIM) ExtractImage(imageNum int, targetDir string, onProgress ProgressFunc) error
- func (w *WIM) ExtractPaths(imageNum int, targetDir string, wimPaths []string) error
- func (w *WIM) ImageCount() (int, error)
- func (w *WIM) ImageDescription(imageNum int) (string, error)
- func (w *WIM) ListChildren(imageNum int, wimDirPath string) ([]string, error)
- func (w *WIM) Overwrite() error
- func (w *WIM) ReferenceResourceFilePaths(paths []string) error
- func (w *WIM) ReferenceResourceFiles(globs []string) error
- func (w *WIM) SetBootImage(imageNum int) error
- func (w *WIM) SetImageName(imageNum int, name, description string) error
- func (w *WIM) SetImageProperty(imageNum int, propertyName, propertyValue string) error
- func (w *WIM) UpdateImageAdd(imageNum int, fsSourcePath, wimTargetPath string) error
- func (w *WIM) UpdateImageAddTree(imageNum int, fsRootDir, wimRootDir string) error
- func (w *WIM) UpdateImageDelete(imageNum int, wimPath string) error
- func (w *WIM) Write(path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecompressDCS ¶
DecompressDCS decompresses a DCS\x01 container (CBS delta-compressed store). The format wraps LZMS-compressed blocks:
Header (12 bytes): Signature(4) + NumberOfBlocks(4, LE) + UncompressedFileSize(4, LE) Per block: BlockSize(4, LE) + DecompressedBlockSize(4, LE) + CompressedData[BlockSize-4] Next block starts at current offset + BlockSize + 4.
Types ¶
type Compression ¶
type Compression int
Compression type for WIM images.
const ( None Compression = 0 LZX Compression = 1 LZMS Compression = 2 )
type Decompressor ¶
type Decompressor struct {
// contains filtered or unexported fields
}
Decompressor wraps a wimlib decompressor handle for raw block decompression.
func NewDecompressor ¶
func NewDecompressor(ctype Compression, maxBlockSize int) (*Decompressor, error)
func (*Decompressor) Close ¶
func (d *Decompressor) Close()
func (*Decompressor) Decompress ¶
func (d *Decompressor) Decompress(compressed []byte, uncompressedSize int) ([]byte, error)
type ProgressFunc ¶
type ProgressFunc func(percentDone int)
ProgressFunc is called during long WIM operations with completion percentage.
type WIM ¶
type WIM struct {
// contains filtered or unexported fields
}
WIM represents an open WIM archive.
func CreateWIM ¶
func CreateWIM(compression Compression) (*WIM, error)
func (*WIM) ExportImage ¶
func (w *WIM) ExportImage(imageNum int, dest *WIM, compression Compression) error
func (*WIM) ExtractImage ¶
func (w *WIM) ExtractImage(imageNum int, targetDir string, onProgress ProgressFunc) error
func (*WIM) ExtractPaths ¶
func (*WIM) ImageCount ¶
func (*WIM) ListChildren ¶
func (*WIM) ReferenceResourceFilePaths ¶
func (*WIM) ReferenceResourceFiles ¶
func (*WIM) SetBootImage ¶
func (*WIM) SetImageProperty ¶
func (*WIM) UpdateImageAdd ¶
func (*WIM) UpdateImageAddTree ¶
Click to show internal directories.
Click to hide internal directories.