"use strict";const tar=require("../tar"),gzip=require("../gzip"),BaseStream=require("../base_stream");class TgzStream extends BaseStream{constructor(r){super(r);const e=this._tarStream=new tar.Stream;e.on("error",r=>this.emit("error",r));const t=new gzip.FileStream;t.on("end",()=>this.push(null)),t.on("data",r=>this.push(r)),t.on("error",r=>this.emit("error",r)),e.pipe(t)}addEntry(r,e){this._tarStream.addEntry(r,e)}}module.exports=TgzStream;