Add PkgFmt::Tbz2

This commit is contained in:
Ryo Yamashita 2022-06-12 23:37:19 +09:00
parent 3b5ea35182
commit 1b9f8c0ffc
No known key found for this signature in database
GPG key ID: 72415AFBE13F8207
4 changed files with 10 additions and 0 deletions

View file

@ -2,6 +2,7 @@ use std::fs::File;
use std::io::{self, BufRead, Read};
use std::path::Path;
use bzip2::bufread::BzDecoder;
use flate2::bufread::GzDecoder;
use log::debug;
use tar::Archive;
@ -19,6 +20,7 @@ pub(super) fn create_tar_decoder(
let r: Box<dyn Read> = match fmt {
Tar => Box::new(dat),
Tbz2 => Box::new(BzDecoder::new(dat)),
Tgz => Box::new(GzDecoder::new(dat)),
Txz => Box::new(XzDecoder::new(dat)),
Tzstd => {