//tar.gz压缩解压

import console;
import fsys.tar;
import fsys.untar;

//tar打包
var tarFile = fsys.tar("/test.tar.gz");
tarFile.onWriteFile = function( filename ){
        console.log("已打包",filename)
}
tarFile.pack("~/lib/fsys/")

//tar解包
var tar = fsys.untar( "/test.tar.gz","/解压目录" );
for(fileName,writeSize,remainSize in tar.eachBlock() ){
    console.printf("正在解压：%s 字节数：%d",fileName,writeSize  ) 
} 

console.pause();