Skip to content

Commit

Permalink
Issues #14, #46: use @klauspost 's compress library instead of standa…
Browse files Browse the repository at this point in the history
…rd compress/*, since it provides better performance on average
  • Loading branch information
valyala committed Feb 10, 2016
1 parent df85922 commit bb2a414
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions compress.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package fasthttp

import (
"bytes"
"compress/flate"
"compress/gzip"
"compress/zlib"
"fmt"
"io"
"os"
"sync"

"github.com/klauspost/compress/flate"
"github.com/klauspost/compress/gzip"
"github.com/klauspost/compress/zlib"
)

// Supported compression levels.
Expand Down
3 changes: 2 additions & 1 deletion fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package fasthttp

import (
"bytes"
"compress/gzip"
"errors"
"fmt"
"html"
Expand All @@ -16,6 +15,8 @@ import (
"strings"
"sync"
"time"

"github.com/klauspost/compress/gzip"
)

// ServeFileUncompressed returns HTTP response containing file contents
Expand Down

0 comments on commit bb2a414

Please sign in to comment.