Skip to content

Commit

Permalink
Use generic dictionary for specific resources to fix backwards compat (
Browse files Browse the repository at this point in the history
…#511)

* Use generic dictionary for specific resources to fix backwards compat

* Also include legacy generic dictionary
  • Loading branch information
Ullaakut committed Oct 28, 2021
1 parent 03d6299 commit 86ace28
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion codec/zbor/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ func NewCodec() *Codec {
zstd.WithDecoderDicts(
payloadDictionary,
legacyPayloadDictionary,
genericDictionary,
legacyGenericDictionary,
),
)
if err != nil {
Expand All @@ -105,6 +107,8 @@ func NewCodec() *Codec {
zstd.WithDecoderDicts(
eventDictionary,
legacyEventDictionary,
genericDictionary,
legacyGenericDictionary,
),
)
if err != nil {
Expand All @@ -119,7 +123,11 @@ func NewCodec() *Codec {
panic(err)
}
transactionDecompressor, err := zstd.NewReader(nil,
zstd.WithDecoderDicts(transactionDictionary),
zstd.WithDecoderDicts(
transactionDictionary,
genericDictionary,
legacyGenericDictionary,
),
)
if err != nil {
panic(err)
Expand Down

0 comments on commit 86ace28

Please sign in to comment.