Skip to content

Commit

Permalink
fix: improve download speeds for restored files
Browse files Browse the repository at this point in the history
  • Loading branch information
garethgeorge committed May 12, 2024
1 parent 411a4fb commit eb07931
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/api/downloadhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ func NewDownloadHandler(oplog *oplog.OpLog) http.Handler {
w.Header().Set("Content-Type", "application/gzip")
w.Header().Set("Content-Transfer-Encoding", "binary")

gzw := gzip.NewWriter(w)
if err := tarDirectory(w, fullPath); err != nil {
gzw, _ := gzip.NewWriterLevel(w, gzip.BestSpeed)
if err := tarDirectory(gzw, fullPath); err != nil {
zap.S().Errorf("error creating tar archive: %v", err)
http.Error(w, "error creating tar archive", http.StatusInternalServerError)
return
Expand Down

0 comments on commit eb07931

Please sign in to comment.