Documentation
¶
Index ¶
- type CompressionProcess
- func (c *CompressionProcess) BenchmarkDecodeTime(minTime time.Duration) (done chan struct{})
- func (c *CompressionProcess) CleanUp()
- func (c *CompressionProcess) CompressAll(ctx context.Context, tools map[string]ExecutedTool) (done chan struct{})
- func (c *CompressionProcess) CompressSingle(fileIdx int, ctx context.Context, tools map[string]ExecutedTool) (done chan struct{})
- func (c *CompressionProcess) IsErrorFree() (ok bool)
- func (c *CompressionProcess) SaveResultsAndReport(writeMode WriteMode) (allOk bool)
- type CompressionResult
- type DecodeTimeBench
- type ExecutedTool
- type FileInfo
- type TempFile
- type WriteMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompressionProcess ¶
type CompressionProcess struct { OriginalFileInfo []*FileInfo OriginalPaths []string TempFiles map[string][]TempFile Results map[string][]*CompressionResult Wrappers map[string]string MinDecodeTime time.Duration AreDecodeTimeComputed bool // contains filtered or unexported fields }
func NewCompressionProcess ¶
func (*CompressionProcess) BenchmarkDecodeTime ¶
func (c *CompressionProcess) BenchmarkDecodeTime(minTime time.Duration) (done chan struct{})
func (*CompressionProcess) CleanUp ¶
func (c *CompressionProcess) CleanUp()
func (*CompressionProcess) CompressAll ¶
func (c *CompressionProcess) CompressAll(ctx context.Context, tools map[string]ExecutedTool) (done chan struct{})
func (*CompressionProcess) CompressSingle ¶
func (c *CompressionProcess) CompressSingle(fileIdx int, ctx context.Context, tools map[string]ExecutedTool) (done chan struct{})
func (*CompressionProcess) IsErrorFree ¶
func (c *CompressionProcess) IsErrorFree() (ok bool)
func (*CompressionProcess) SaveResultsAndReport ¶
func (c *CompressionProcess) SaveResultsAndReport(writeMode WriteMode) (allOk bool)
type CompressionResult ¶
type CompressionResult struct { Command *exec.Cmd Arguments []string TimeTaken time.Duration OriginalSize int64 FinalSize int64 CreateError error CommandError error ReadFinalSizeError error Decode DecodeTimeBench }
func (*CompressionResult) HasError ¶
func (r *CompressionResult) HasError() bool
type DecodeTimeBench ¶
func (DecodeTimeBench) MSAverageToString ¶
func (dt DecodeTimeBench) MSAverageToString() string
func (DecodeTimeBench) MSAverageWithTrialsCountString ¶
func (dt DecodeTimeBench) MSAverageWithTrialsCountString() string
type ExecutedTool ¶
type ExecutedTool struct { *config.CompressionTool Arguments []string }
func ToolConfigToExecutedTool ¶
func ToolConfigToExecutedTool(tool *config.ToolConfig, argPreset string) (result ExecutedTool, ok bool)
type WriteMode ¶
type WriteMode int
const ( KeepBest WriteMode = iota // Copies the best compressed file onto the same directory as the input file KeepAll // Copy all compressed files onto the same directory as the input file Overwrite // Overwrites the input file with the best compressed file None // Do not produce a new file even if the file is successfully compressed )
Click to show internal directories.
Click to hide internal directories.