Am 25.02.26 um 1:06 PM schrieb Markus Ebner: > The previous implementation always decoded the base64-encoded content > received from the qemu-guest-agent file-read call. Since JSON strings > must be comliant unicode text, binary data got escaped using unicode > escape sequences, using the pattern: \u00XX - with XX being the hex > value of the byte to encode. For certain binary files, this lead to a > massively inflated payload size of the API response. > > Comparison on my test system: > For a 4MiB test-file generated using > dd if=/dev/urandom bs=4M count=1 > > - Reading it with decode=1 transfers 8.61MiB and takes 5700ms on avg. > - Reading it with decode=0 transfers 5.59MiB and takes 3300ms on avg. > > To be backwards compatible, the decode parameter defaults to 1. > > Signed-off-by: Markus Ebner <[email protected]>
Reviewed-by: Fiona Ebner <[email protected]>
