display both original and packetization byte count

This commit is contained in:
Lewis Moten
2024-05-08 15:58:20 -04:00
parent 9b24250d24
commit 37b8bd53eb
2 changed files with 6 additions and 4 deletions

View File

@@ -304,8 +304,9 @@ function updatePacketStats() {
const bits = textToBits(text);
const bitCount = getPacketizationBitCount(bits.length);
const byteCount = bitCount / 8;
document.getElementById('data-byte-count').innerText = byteCount.toLocaleString();
document.getElementById('data-bit-count').innerText = bitCount.toLocaleString();
document.getElementById('original-byte-count').innerText = textToBytes(text).length.toLocaleString();
document.getElementById('packetization-byte-count').innerText = byteCount.toLocaleString();
document.getElementById('packetization-bit-count').innerText = bitCount.toLocaleString();
document.getElementById('packet-bit-count').innerText = getPacketBitCount().toLocaleString();
document.getElementById('packet-count').innerText = getPacketCount(bitCount).toLocaleString();
document.getElementById('packet-error-correction').innerText = HAMMING_ERROR_CORRECTION ? 'Yes' : 'No';