{"modulePath":"github.com/ArrayNone/compacty","version":"v1.1.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package compressor\n\n## Types\n\n```go\ntype CompressionProcess struct {\n\tOriginalFileInfo []*FileInfo\n\tOriginalPaths    []string\n\tTempFiles        map[string][]TempFile\n\n\tResults  map[string][]*CompressionResult\n\tWrappers map[string]string\n\n\tMinDecodeTime         time.Duration\n\tAreDecodeTimeComputed bool\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc NewCompressionProcess(\n\tpaths []string,\n\twrappers map[string]string,\n\ttoolOutput io.Writer,\n) (c *CompressionProcess, allOk bool)\n```\n\n```go\nfunc (c *CompressionProcess) BenchmarkDecodeTime(minTime time.Duration) (done chan struct{})\n```\n\n```go\nfunc (c *CompressionProcess) CleanUp()\n```\n\n```go\nfunc (c *CompressionProcess) CompressAll(ctx context.Context, tools map[string]ExecutedTool) (done chan struct{})\n```\n\n```go\nfunc (c *CompressionProcess) CompressSingle(fileIdx int, ctx context.Context, tools map[string]ExecutedTool) (done chan struct{})\n```\n\n```go\nfunc (c *CompressionProcess) IsErrorFree() (ok bool)\n```\n\n```go\nfunc (c *CompressionProcess) SaveResultsAndReport(writeMode WriteMode) (allOk bool)\n```\n\n```go\ntype CompressionResult struct {\n\tCommand   *exec.Cmd\n\tArguments []string\n\tIsWrapped bool\n\n\tTimeTaken time.Duration\n\n\tOriginalSize int64\n\tFinalSize    int64\n\n\tCreateFileError    error\n\tCommandError       error\n\tReadFinalSizeError error\n\n\tDecode DecodeTimeBench\n}\n```\n\n```go\nfunc (r *CompressionResult) HasError() bool\n```\n\n```go\ntype DecodeTimeBench struct {\n\tTotal   time.Duration\n\tAverage time.Duration\n\tTrials  int\n\n\tErr error\n}\n```\n\n```go\nfunc (dt DecodeTimeBench) MSAverageToString() string\n```\n\n```go\nfunc (dt DecodeTimeBench) MSAverageWithTrialsCountString() string\n```\n\n```go\ntype ExecutedTool struct {\n\t*config.CompressionTool\n\tArguments []string\n}\n```\n\n```go\nfunc ToolConfigToExecutedTool(tool *config.ToolConfig, argPreset, toolName string) (result ExecutedTool, ok bool)\n```\n\n```go\ntype FileInfo struct {\n\tPath string\n\n\tDirectory string\n\tFileName  string\n\tBaseName  string\n\tExtension string\n\n\tSize int64\n\n\tDecode DecodeTimeBench\n}\n```\n\n```go\ntype TempFile struct {\n\tPath        string\n\tCreateError error\n}\n```\n\n```go\ntype WriteMode int\n```\n\n```go\nconst (\n\tKeepBest  WriteMode = iota // Copies the best compressed file onto the same directory as the input file\n\tKeepAll                    // Copy all compressed files onto the same directory as the input file\n\tOverwrite                  // Overwrites the input file with the best compressed file\n\tNone                       // Do not produce a new file even if the file is successfully compressed\n)\n```\n\n","path":"github.com/ArrayNone/compacty/internal/compressor","name":"compressor","synopsis":"","isRedistributable":true}
