CCarryLoam
Product

Product features · Odd-byte Internet checksums

01

Review internet_checksum.py around the final odd byte and carry folding before using its checksum as a transport diagnostic.

01

Connection

Base URL, credentials and a reachable server.

02

Selection

A model available through the configured endpoint.

03

Capabilities

Context limits and tool support are determined by the model and server.

Odd-byte Internet checksums

● ● ●CarryLoam●
A concrete starting point · Odd-byte Internet checksums ×
def internet_checksum(data):
    if type(data) is not bytes or len(data) > 65535:
        raise ValueError("checksum.bytes")
    total = 0
    for i in range(0, len(data), 2):
        total += (data[i] << 8) | (data[i+1] if i+1 < len(data) else 0)
    while total >> 16:
        total = (total & 65535) + (total >> 16)
    return (~total) & 65535
✳Odd-byte Internet checksums
✓ ChangesReview before applying ↗
Illustrative workspace
AI coding workspace

Your next change starts here.

Get the Windows app ↗