From 49741d9c42ba74d6ccb845681285f69b0ce98ecb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 29 Jun 2023 08:50:57 +0530 Subject: [PATCH] Note that when chunking base64 data for the graphics escape code chunks must be 4-byte aligned --- docs/graphics-protocol.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/graphics-protocol.rst b/docs/graphics-protocol.rst index 966d6f9a2..49b151fc4 100644 --- a/docs/graphics-protocol.rst +++ b/docs/graphics-protocol.rst @@ -342,11 +342,12 @@ Remote clients, those that are unable to use the filesystem/shared memory to transmit data, must send the pixel data directly using escape codes. Since escape codes are of limited maximum length, the data will need to be chunked up for transfer. This is done using the ``m`` key. The pixel data must first be -base64 encoded then chunked up into chunks no larger than ``4096`` bytes. The client -then sends the graphics escape code as usual, with the addition of an ``m`` key that -must have the value ``1`` for all but the last chunk, where it must be ``0``. For example, -if the data is split into three chunks, the client would send the following -sequence of escape codes to the terminal emulator:: +base64 encoded then chunked up into chunks no larger than ``4096`` bytes. All +chunks, except the last, must have a size that is a multiple of 4. The client +then sends the graphics escape code as usual, with the addition of an ``m`` key +that must have the value ``1`` for all but the last chunk, where it must be +``0``. For example, if the data is split into three chunks, the client would +send the following sequence of escape codes to the terminal emulator:: _Gs=100,v=30,m=1;\ _Gm=1;\