Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions plantuml/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package plantuml

import (
"bytes"
"compress/zlib"
"compress/flate"
"io"
)

Expand All @@ -18,7 +18,7 @@ func DeflateAndEncode(text string) (string, error) {
// PlantUML server.
func DeflateAndEncodeBytes(text []byte) (string, error) {
var buf bytes.Buffer
zw, err := zlib.NewWriterLevel(&buf, zlib.BestCompression)
zw, err := flate.NewWriter(&buf, flate.BestCompression)
if err != nil {
return "", err
}
Expand Down
2 changes: 1 addition & 1 deletion plantuml/encode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func TestEncode(t *testing.T) {
Bob -> Alice : hello
@enduml`

expected := "UDfoA2v9B2efpStXSifFKj2rKt3CoKnELR1Io4ZDoSddSaZDIodDpG44003___W93C00"
expected := "SYWkIImgAStDuNBAJrBGjLDmpCbCJbMmKiX8pSd9vt98pKifpSq11000__y0"

encoded, err := DeflateAndEncode(source)

Expand Down