term.gfx.proto.build_data

term.gfx.proto

build_data(data, options) -> payload

Build a kitty graphics data payload with base64 encoding and chunking

Base64-encodes data and splits it into 4096-byte chunks as required by the Kitty graphics protocol. All chunks except the last carry m=1 (more data follows); the final chunk uses m=0. Returns a single string containing all APC sequences ready for io.write.