FIND YOUR NEXT FEW LINES

Results for “Binary formats & structured parsing”

Small, practical examples. Search by task or narrow things down below.

155 snippets foundClear filters
JavaEncoding & structured values

Decode a form query parameter

Java: URLDecoder reverses form encoding and treats plus as a space.

Java✓ Tested
RustParsing & byte data

Decode bytes as validated UTF-8

Decode bytes as validated UTF-8 in a complete Rust program using the standard library.

Rust✓ Tested
JavaFile operations & binary data

Delete a known temporary file if present

Java: deleteIfExists returns whether a file was removed and still reports other I/O errors.

Java✓ Tested
RustParsing & byte data

Detect invalid UTF-8 data

Detect invalid UTF-8 data in a complete Rust program using the standard library.

Rust✓ Tested
JavaEncoding & structured values

Encode a form query parameter

Java: URLEncoder uses application/x-www-form-urlencoded rules, including plus signs for spaces.

Java✓ Tested
Arduino / CBinary values & packets

Encode a value as little-endian bytes

Arduino / C: Store the least significant byte first when the protocol requires it.

Arduino / C✓ Tested
RustParsing & byte data

Encode an integer as big-endian bytes

Encode an integer as big-endian bytes in a complete Rust program using the standard library.

Rust✓ Tested
JavaEncoding & structured values

Encode and decode Base64 bytes

Java: Convert through UTF-8 explicitly before and after Base64 encoding.

Java✓ Tested
C++Text validation & parsing

Extract a substring with an explicit count

C++: The second substr argument is a length rather than an ending index.

C++✓ Tested
Arduino / CBinary values & packets

Extract the low and high byte of a value

Arduino / C: lowByte and highByte expose the two bytes of a 16-bit value.

Arduino / C✓ Tested
C++Numeric parsing & calculations

Find the greatest common divisor with the standard library

C++: std::gcd computes a nonnegative integer common divisor.

C++✓ Tested
C++Numeric parsing & calculations

Find the least common multiple with the standard library

C++: std::lcm combines positive integer periods into a common cycle.

C++✓ Tested