File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import (
14
14
"github.com/spiegel-im-spiegel/gpgpdump/packet/values"
15
15
)
16
16
17
- // tag08 class for Compressed Data Packet
17
+ //Tag08 class for Compressed Data Packet
18
18
type Tag08 struct {
19
19
* tagInfo
20
20
data io.Reader
@@ -37,6 +37,7 @@ func (t *Tag08) Parse() (*info.Item, error) {
37
37
rootInfo .Add (cid .ToItem (t .cxt .Debug ()))
38
38
39
39
if t .reader .Rest () > 0 {
40
+ rootInfo .Add (values .RawData (t .reader , "Compressed data" , t .cxt .Debug ()))
40
41
var err error
41
42
switch compID {
42
43
case 1 : //zip <RFC1951>
@@ -46,13 +47,13 @@ func (t *Tag08) Parse() (*info.Item, error) {
46
47
case 3 : //bzip2
47
48
t .data , err = t .extractBzip2 ()
48
49
default :
49
- rootInfo .Add (values .RawData (t .reader , "Compressed data" , t .cxt .Debug ()))
50
50
}
51
51
return rootInfo , err
52
52
}
53
53
return rootInfo , nil
54
54
}
55
55
56
+ //Reader returns io.Reader of compressed data
56
57
func (t * Tag08 ) Reader () io.Reader {
57
58
return t .data
58
59
}
@@ -93,7 +94,7 @@ func (t *Tag08) extractBzip2() (io.Reader, error) {
93
94
return buf , nil
94
95
}
95
96
96
- /* Copyright 2016 Spiegel
97
+ /* Copyright 2016,2017 Spiegel
97
98
*
98
99
* Licensed under the Apache License, Version 2.0 (the "License");
99
100
* you may not use this file except in compliance with the License.
You can’t perform that action at this time.
0 commit comments