Skip to content

Commit 1e9ec94

Browse files
committed
use best speed
1 parent 9038a3f commit 1e9ec94

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/files.go

+2
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,13 @@ func (c *Croc) processFile(src string) (err error) {
6161
fd.IsDir = info.Mode().IsDir()
6262

6363
// zip file
64+
log.Debug("zipping file")
6465
c.crocFile, err = zipFile(path.Join(pathToFile, filename), c.UseCompression)
6566
if err != nil {
6667
log.Error(err)
6768
return
6869
}
70+
log.Debug("...finished zipping")
6971
fd.IsCompressed = c.UseCompression
7072
fd.IsEncrypted = c.UseEncryption
7173

src/zip.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func zipFile(fname string, compress bool) (writtenFilename string, err error) {
9595
zipWriter := zip.NewWriter(newfile)
9696
zipWriter.RegisterCompressor(zip.Deflate, func(out io.Writer) (io.WriteCloser, error) {
9797
if compress {
98-
return flate.NewWriter(out, flate.BestCompression)
98+
return flate.NewWriter(out, flate.BestSpeed)
9999
} else {
100100
return flate.NewWriter(out, flate.NoCompression)
101101
}

0 commit comments

Comments
 (0)