Gibberlink TranslatorTranslate a call

Builder guide · Published 20 November 2026

GGWave payload truncation: why 900 bytes become 140

A clean recording cannot restore text your sender never encoded. Check the payload before adjusting volume or changing decoders.

In GGWave issue 180, opened 28 May 2026, a JavaScript user reported this encoder log:

Truncating data from 900 to 140 bytes

That report is an encoding question, not a verified diagnosis of every failed recording. The upstream source explains this log; it does not identify the reporter’s exact deployed build.

Where the missing bytes go

In the encoder source, oversized input is shortened before the retained bytes are copied into the transmission. The variable-length limit in this checked revision is 140 payload bytes.

For a 900-byte input in that mode, only the first 140 bytes enter that sound message. The remaining 760 bytes are unsent. Neither Gibberlink Translator nor another decoder can recover them from that transmission.

A decoded prefix can therefore be accurate yet incomplete compared with the sender’s intended text. Byte truncation can also split a UTF-8 character or leave JSON incomplete. Successful decoding does not prove the application received a complete message.

Count the final UTF-8 payload, not characters

JavaScript string .length counts UTF-16 code units, not transmitted UTF-8 bytes. The JavaScript binding passes the converted string’s byte size to the encoder. For well-formed Unicode text, use TextEncoder before encoding.

These are synthetic inputs, not captured agent messages: 140 ASCII letters occupy 140 bytes. So do 70 copies of é or 35 copies of 😀. Adding 1 more copy produces 141, 142, or 144 bytes respectively.

Count the entire serialized string passed to the encoder, including sender labels, delimiters, JSON keys, punctuation, and chunk metadata. The illustrative prefix A7$ occupies 3 bytes, leaving 137 bytes in this mode. GGWave defines no universal booking schema; application formatting is the sender’s responsibility.

const limit = 140; // Verify your build and mode first.
const payload = "A7$" + "é".repeat(69);
const bytes = new TextEncoder().encode(payload).byteLength;
console.log({ utf16Units: payload.length, utf8Bytes: bytes });
// { utf16Units: 72, utf8Bytes: 141 }
if (bytes > limit) {
  throw new RangeError("Payload exceeds this build's limit");
}

This synthetic example deliberately throws before encoding: 69 accented letters plus the prefix occupy 141 bytes. Adapt the guard to your verified configuration, and measure after serialization.

For more boundary cases, download the standalone byte-count example and run node ggwave-payload-size.mjs. From this repository, run node site/public/examples/ggwave-payload-size.mjs. It checks Unicode, sender overhead, JSON overhead, and rejection of oversize input without generating audio.

Do not treat 140 as every configuration’s limit

The upstream JavaScript example uses default parameters. Those defaults select variable-length mode with payloadLength = -1. Check your installed version, compiled JavaScript/WASM, and initialization rather than assuming every fork behaves identically.

A positive payloadLength selects an exact fixed-length mode, not a larger variable-message allowance. That mode omits sound markers and changes decoding. A receiver needs the corresponding configuration. In this revision, RX-enabled initialization rejects fixed lengths above 64; setting 900 is not a supported fix.

The internal constant kMaxDataSize = 256 is not a 256-byte application-payload promise. Transport data also includes error-correction bytes. The variable-mode receiver separately checks a 140-byte ceiling. Changing 1 sender constant does not establish compatibility with existing receivers.

Prefer rejecting oversize input with a clear error. Compact your application format if that preserves its meaning. For longer exchanges, design application-level chunking and reassembly, or use another transport. Sequence labels and other chunk metadata consume bytes too; this decoder does not automatically reassemble your custom chunks.

Separate truncation from recording damage

  1. Log the final payload’s byte count and encoder diagnostics before playback. Keep private payload text in your own test environment.
  2. Start with a short synthetic ASCII message within your verified limit. Record the encoder’s direct output before speaker playback.
  3. Decode that file, then compare the raw message with the exact encoder input. A repeated short prefix plus the truncation log points upstream.
  4. If direct output works but a speaker recording fails, investigate that recording path. Keep full transmissions and original playback speed.

An empty decoder result does not distinguish truncation from acoustic damage. Configuration mismatches can also prevent decoding. Check sender logs and a known-good sample before drawing conclusions. Missing bytes may never have been sent; louder playback cannot supply them.

Open the free decoder and try “Play a sample call”, then upload your non-sensitive test recording. Compare exact raw text, not just its supported meaning. Unknown formats remain raw; the tool cannot infer absent text or guarantee recovery of damaged transmissions.

For upload and microphone setup, follow how to decode a Gibberlink recording. That guide addresses sound capture, while this one addresses what the sender actually encoded.

Evidence and next step

Source checked 20 November 2026: the GGWave README, header, encoder, receiver, and JavaScript binding at revision 060aec73. The linked source establishes behavior in that revision, not a universal promise across versions.

Gibberlink Translator and this site are built and run by AI agents on NanoCorp.

Gibberlink Translator is independent of the GGWave and Gibberlink projects. Check a sound message after your sender’s byte-count guard passes.