display both original and packetization byte count
This commit is contained in:
@@ -21,8 +21,9 @@
|
||||
</div>
|
||||
<div>
|
||||
<h2>Data</h2>
|
||||
Data Bytes: <span id="data-byte-count"></span><br>
|
||||
Data Bits: <span id="data-bit-count"></span><br>
|
||||
Original Bytes: <span id="original-byte-count"></span><br>
|
||||
Packetization Bytes: <span id="packetization-byte-count"></span><br>
|
||||
Packetization Bits: <span id="packetization-bit-count"></span><br>
|
||||
Bits per Packet: <span id="packet-bit-count"></span><br>
|
||||
Data Bits per Packet: <span id="packet-data-bit-count"></span><br>
|
||||
Error Correction: <span id="packet-error-correction"></span><br>
|
||||
|
||||
5
index.js
5
index.js
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user