sys - add temp traces xtract
This commit is contained in:
parent
f88c96fece
commit
bb3f2c0f58
|
@ -50,16 +50,19 @@ func (x *Xtract) writeUncompressedData(out *bytes.Buffer) bool {
|
||||||
|
|
||||||
func (x *Xtract) UnGzip(dumpName string) bool {
|
func (x *Xtract) UnGzip(dumpName string) bool {
|
||||||
x.setCompressedFile(dumpName)
|
x.setCompressedFile(dumpName)
|
||||||
|
fmt.Printf("xtract %s : %+v\n", dumpName, x)
|
||||||
var out bytes.Buffer
|
var out bytes.Buffer
|
||||||
r, err := gzip.NewReader(x.reader)
|
r, err := gzip.NewReader(x.reader)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
var w64 int64 = 0
|
||||||
if x.withBar {
|
if x.withBar {
|
||||||
_, err = io.Copy(io.MultiWriter(&out, *x.bar), r)
|
w64, err = io.Copy(io.MultiWriter(&out, *x.bar), r)
|
||||||
} else {
|
} else {
|
||||||
_, err = io.Copy(&out, r)
|
w64, err = io.Copy(&out, r)
|
||||||
}
|
}
|
||||||
|
fmt.Printf(" xtract (%d) err : %v\n", w64, err)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user