mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 14:46:03 +00:00
Use SIMD base64 encoding for graphics transmission
This commit is contained in:
parent
93573aec6f
commit
744ad7438c
2 changed files with 3 additions and 5 deletions
|
|
@ -5,12 +5,13 @@ package graphics
|
|||
import (
|
||||
"bytes"
|
||||
"compress/zlib"
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"io"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/emmansun/base64"
|
||||
|
||||
"github.com/kovidgoyal/kitty/tools/tty"
|
||||
"github.com/kovidgoyal/kitty/tools/tui/loop"
|
||||
"github.com/kovidgoyal/kitty/tools/utils"
|
||||
|
|
|
|||
|
|
@ -19,10 +19,7 @@ func collectDecode(t *testing.T, d *StreamingBase64Decoder, encoded []byte, chun
|
|||
t.Helper()
|
||||
var result []byte
|
||||
for len(encoded) > 0 {
|
||||
end := chunkSize
|
||||
if end > len(encoded) {
|
||||
end = len(encoded)
|
||||
}
|
||||
end := min(chunkSize, len(encoded))
|
||||
chunk := encoded[:end]
|
||||
encoded = encoded[end:]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue