9 // TarBzip2Decompressor is an implementation of Decompressor that can
10 // decompress tar.bz2 files.
11 type TarBzip2Decompressor struct{}
13 func (d *TarBzip2Decompressor) Decompress(dst, src string, dir bool) error {
14 // If we're going into a directory we should make that first
17 mkdir = filepath.Dir(dst)
19 if err := os.MkdirAll(mkdir, 0755); err != nil {
24 f, err := os.Open(src)
30 // Bzip2 compression is second
31 bzipR := bzip2.NewReader(f)
32 return untar(bzipR, dst, src, dir)