Results for “Streams & byte tools”
Small, practical examples. Search by task or narrow things down below.
Compare binary buffers including zero bytes
C: memcmp checks an explicit byte length rather than stopping at a string terminator.
C✓ Tested
Compare two byte buffers
Compare two byte buffers using a complete Go program with explicit sample inputs.
Go✓ Tested
Compare two generated sorted streams
Bash Scripts: Process substitution lets a command consume another command’s output as a file-like input.
Bash Scripts✓ Tested
Convert between hexadecimal text and bytes
PowerShell: Use the .NET hexadecimal helpers instead of parsing byte pairs manually.
PowerShell✓ Tested
Convert bytes to Base64 and back
C#: Encode text to UTF-8 before converting it to a Base64 representation.
C#✓ Tested
Convert bytes to hexadecimal and back
Java: Use HexFormat for a standard-library representation of raw bytes.
Java✓ Tested
Convert hexadecimal text to bytes
Python: Use bytes.fromhex for a readable byte representation and hex for the reverse conversion.
Python✓ Tested
Copy a file and inspect the copied byte count
Copy a file and inspect the copied byte count in a complete Rust program using the standard library.
Rust✓ Tested
Copy a multibyte interrupt-owned counter atomically
Arduino / C: ATOMIC_RESTORESTATE restores the interrupt state after reading a shared value.
Arduino / C✓ Tested
Copy a stream and count its bytes
Copy a stream and count its bytes using a complete Go program with explicit sample inputs.
Go✓ Tested
Create an independent copy of a byte buffer
C: Allocate the exact byte length and copy only after checking the result.
C✓ Tested
Decode bytes as validated UTF-8
Decode bytes as validated UTF-8 in a complete Rust program using the standard library.
Rust✓ Tested