Top "Byte" questions

A unit of information usually corresponding to 8 bits.

What does a b prefix before a python string mean?

In a python source code I stumbled upon I've seen a small b before a string like in: b"abcdef" …

python syntax python-3.x byte
How to use high and low bytes?

I am trying to represent 32768 using 2 bytes. For the high byte, do I use the same values as the low …

c++ byte bytearray bit 16-bit
TypeError: sequence item 0: expected str instance, bytes found

for line in fo: line = " ".join(line.split()) line = line.strip() I am getting an error line = ''.join(line.…

python string python-3.x byte typeerror
How to correctly convert filesize in bytes into mega or gigabytes?

I'm using the DriveInfo class in my C# project to retrieve the available bytes on given drives. How to I …

c# byte disk driveinfo megabyte
Python 3 How do I 'declare' an empty `bytes` variable

How do I 'declare' an empty bytes variable in Python 3? I am trying to receive chunks of bytes, and later …

python variables python-3.x byte variable-assignment
What is the maximum number of bytes for a UTF-8 encoded character?

What is the maximum number of bytes for a single UTF-8 encoded character? I'll be encrypting the bytes of a …

utf-8 character-encoding byte character
Python: Extracting bits from a byte

I'm reading a binary file in python and the documentation for the file format says: Flag (in binary)Meaning 1 nnn …

python byte bit
StringBuilder and byte conversion

I have the following code: StringBuilder data = new StringBuilder(); for (int i = 0; i < bytes1; i++) { data.Append("a"); } byte[] …

c# encoding byte stringbuilder
How to convert Byte array to ByteArrayOutputStream

I need to convert a byte array to ByteArrayOutputStream so that I can display it on screen.

java byte bytearrayoutputstream
Maximum length of byte[]?

I'm trying to create an array of bytes whose length is UInt32.MaxValue. This array is essentially a small(ish) …

c# arrays byte unsafe