Results for “bytes”
Small, practical examples. Search by task or narrow things down below.
Encode and decode binary data as Base64
Python: Use Base64 when a text format must carry bytes; it is encoding, not encryption.
Python✓ Tested
Encode and decode UTF-8 text with Base64
PowerShell: Convert the string to bytes explicitly before Base64 encoding.
PowerShell✓ Tested
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
Inspect a file length without reading it
C#: Use FileInfo.Length to retrieve a logical size in bytes.
C#✓ Tested
Measure a short text value
Python: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
Python✓ Tested
Measure a short text value
C#: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
C#✓ Tested
Measure a short text value
Java: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
Java✓ Tested
Measure a short text value
JavaScript: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
JavaScript✓ Tested
Measure a short text value
TypeScript: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
TypeScript✓ Tested
Measure a short text value
C++: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
C++✓ Tested
Measure a short text value
C: Read the length of an ASCII string. Non-ASCII text may use multiple code units or bytes depending on the language.
C✓ Tested
Measure a string length
Count bytes before the null terminator with C strlen.
C✓ Tested