aboutsummaryrefslogtreecommitdiff
path: root/zsig
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-07-25 23:32:10 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-07-25 23:32:10 +0200
commit15fe28c9af4a69d5fb5188c3cbeadae31a9c891f (patch)
tree89f665b0dd71fbe4db17f598bdb494924a774290 /zsig
parente718cddb32df846caea3a1235a3dc806e03dc1e4 (diff)
prototype gzip verify
Diffstat (limited to 'zsig')
-rw-r--r--zsig/header.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/zsig/header.go b/zsig/header.go
index 7bf87ed..c63a03b 100644
--- a/zsig/header.go
+++ b/zsig/header.go
@@ -2,6 +2,7 @@ package zsig
import (
"bufio"
+ "bytes"
"encoding/hex"
"fmt"
"io"
@@ -29,6 +30,11 @@ func (h ZHeader) Print(w io.Writer) error {
return nil
}
+func ParseBytes(data []byte) (ZHeader, error) {
+ r := bytes.NewReader(data)
+ return Parse(r)
+}
+
func Parse(r io.Reader) (ZHeader, error) {
var h ZHeader
s := bufio.NewScanner(r)