From e8456b0d49f3b4fc0bec4ae6b775031c5c3ef473 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Fri, 20 Feb 2015 14:53:05 -0500 Subject: [PATCH] main.go: found the padding after EOF ... --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index 59cd225..4ceb75d 100644 --- a/main.go +++ b/main.go @@ -43,6 +43,11 @@ func main() { if err != io.EOF { log.Println(err) } + // even when an EOF is reached, there is often 1024 null bytes on + // the end of an archive. Collect them too. + post := tr.RawBytes() + output.Write(post) + sum += int64(len(post)) break }