Commit 828c7bbe authored by Jonny Schäfer's avatar Jonny Schäfer
Browse files

NewComposites: Use bzip2 instead of gzip

parent 7ca845ce
......@@ -21,7 +21,7 @@ package radolan
import (
"archive/tar"
"bufio"
"compress/gzip"
"compress/bzip2"
"fmt"
"io"
"sort"
......@@ -132,16 +132,12 @@ func NewComposite(rd io.Reader) (comp *Composite, err error) {
return
}
// NewComposites reads tar gz data from rd and returns the parsed composites sorted by
// NewComposites reads .tar.bz2 data from rd and returns the parsed composites sorted by
// ForecastTime in ascending order.
func NewComposites(rd io.Reader) ([]*Composite, error) {
gzipReader, err := gzip.NewReader(rd)
if err != nil {
return nil, err
}
defer gzipReader.Close()
bzipReader := bzip2.NewReader(rd)
tarReader := tar.NewReader(gzipReader)
tarReader := tar.NewReader(bzipReader)
var cs []*Composite
for {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment