Skip to content

Commit 43c33d5

Browse files
Modified packet.Tag08 (Compressed Data Packet)
1 parent ad25c06 commit 43c33d5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packet/tags/Tag08.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/spiegel-im-spiegel/gpgpdump/packet/values"
1515
)
1616

17-
// tag08 class for Compressed Data Packet
17+
//Tag08 class for Compressed Data Packet
1818
type Tag08 struct {
1919
*tagInfo
2020
data io.Reader
@@ -37,6 +37,7 @@ func (t *Tag08) Parse() (*info.Item, error) {
3737
rootInfo.Add(cid.ToItem(t.cxt.Debug()))
3838

3939
if t.reader.Rest() > 0 {
40+
rootInfo.Add(values.RawData(t.reader, "Compressed data", t.cxt.Debug()))
4041
var err error
4142
switch compID {
4243
case 1: //zip <RFC1951>
@@ -46,13 +47,13 @@ func (t *Tag08) Parse() (*info.Item, error) {
4647
case 3: //bzip2
4748
t.data, err = t.extractBzip2()
4849
default:
49-
rootInfo.Add(values.RawData(t.reader, "Compressed data", t.cxt.Debug()))
5050
}
5151
return rootInfo, err
5252
}
5353
return rootInfo, nil
5454
}
5555

56+
//Reader returns io.Reader of compressed data
5657
func (t *Tag08) Reader() io.Reader {
5758
return t.data
5859
}
@@ -93,7 +94,7 @@ func (t *Tag08) extractBzip2() (io.Reader, error) {
9394
return buf, nil
9495
}
9596

96-
/* Copyright 2016 Spiegel
97+
/* Copyright 2016,2017 Spiegel
9798
*
9899
* Licensed under the Apache License, Version 2.0 (the "License");
99100
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)