1
0
Fork 1
mirror of https://github.com/vbatts/tar-split.git synced 2024-12-19 11:56:30 +00:00

tar/storage: remove TODO's on sailed shipped for changing the encoding

this function is used widely and it's JSON. And it was not written in
such a way as to have exchangable codec.. per se
So, maybe I'll just kick out the idea of using https://github.com/ugorji/go

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2023-03-25 21:24:32 -04:00
parent 075c33cadf
commit e4450847fb
Signed by: vbatts
GPG key ID: E30EFAA812C6E5ED

View file

@ -24,13 +24,6 @@ type Unpacker interface {
Next() (*Entry, error)
}
/* TODO(vbatts) figure out a good model for this
type PackUnpacker interface {
Packer
Unpacker
}
*/
type jsonUnpacker struct {
seen seenNames
dec *json.Decoder
@ -115,13 +108,3 @@ func NewJSONPacker(w io.Writer) Packer {
seen: seenNames{},
}
}
/*
TODO(vbatts) perhaps have a more compact packer/unpacker, maybe using msgapck
(https://github.com/ugorji/go)
Even though, since our jsonUnpacker and jsonPacker just take
io.Reader/io.Writer, then we can get away with passing them a
gzip.Reader/gzip.Writer
*/