Questions tagged [bytestream]

A bytestream is a series of bytes.

Formally, a byte stream is a certain abstraction, a communication channel down which one entity can send a sequence of bytes to the entity on the other end. Such channel is often bidirectional, but sometimes unidirectional. In almost all instances, the channel has the property that it is reliable; i.e. exactly the same bytes emerge, in exactly the same order, at the other end.

Less formally, one can think of it as a conduit between the two entities; one entity can insert bytes into the conduit, and the other entity then receives them. This conduit can be ephemeral or persistent.

See more:

173 questions
0
votes
1 answer

How to properly construct a wav file from a stream of bytes in flutter?

I am receiving bytes from a BLE device. The device is recording audio for 5 secs and sends it to an Android phone in pcm format. 8khz 4 channels 16-bit sample (2 bytes per sample). number of samples = 160 000 5 secs recording I am a complete…
chessasuke
  • 17
  • 1
  • 6
0
votes
1 answer

Reading wav file as stream file

I'm attempting to read a zip file containing both M4A and WAV files. My goal is to extract and process these audio files, and then upload them as NPY files to a database. I'm uncertain whether my current approach of reading the files directly from…
0
votes
0 answers

Reading AES encrypted message from TCP socket in C#?

I am using TCP socket in C# sending and receiving encrypted messages using AES encryption algorithm. The problem is when I receive the encrypted message using stream reader, it came as System.byte[] which I do not know how to read it to pass it to…
Ali Hasan
  • 53
  • 1
  • 4
0
votes
0 answers

Write numpy array as tiff file and compress it using gzip

I want to write a numpy array (Dim - 3, shape - (2400, 2400, 3), Type - float32) to a tiff file and then compress it to gz file without needing a buffer. from PIL import Image with mgzip.open(f'{file_path}.gz', 'wb') as f_out: byte_stream =…
0
votes
1 answer

How can I display byte encoded PDF in HTML?

My goal is to download a file from a file-sharing application (Egnyte) and render it in my own HTML. I'm working in Django. I'm getting a 200 response from the storage service: response.headers: {'Content-Type':…
0
votes
0 answers

Can Byte Stream be flowing like a nodejs stream? What is the difference from Byte Array?

Totally confused with with the terminology here. A Byte Array is an array of bytes that have to be loaded in the memory entirely when used. A Byte Stream is ... Well, it is a sequence of Bytes. But is it the same as Byte Array? Or does it have the…
Kid_Learning_C
  • 2,605
  • 4
  • 39
  • 71
0
votes
0 answers

Really confused with byte stream, Unit8Array, arrayBuffer, node stream, etc

First of all, I clearly know what node.js stream is. Node.js stream is used when I need a way to serve data in chunks, piece by piece, to the memory, instead of loading the entire content of a file into the memory and crashing the process. Node.js…
Kid_Learning_C
  • 2,605
  • 4
  • 39
  • 71
0
votes
1 answer

Download a pdf direct to memory to use it with python

The goal is to download a pdf file via requests (Python) without saving it on the hard disk. The i'd like to access it with PdfReader from PyPDF2, again without saving it. def readFile(self, id): req = get(f'{self.workUrl}{id}/content',…
Luca2501
  • 13
  • 1
0
votes
1 answer

Need help understanding bytestream in PyAudio

I am writing a program for me to better understand the PyAudio module, in trying to understand how best to manipulate the audio stream, I convert the last 10 values of the first chunk into integers and compare it with the corresponding original…
yib
  • 1
0
votes
1 answer

Reading a tarfile is empty in python even though tar -zxcf works

Im trying to read and write tar.gz files from memory using python. I have read over the relevant python docs and have come up with the following minimum working example to demonstrate my issue. text = "This is a test." file_name =…
0
votes
1 answer

How to recieve and parse data coming from a Python socket server in dart?

I have a socket server running in Python that sends a byte stream through the socket in which, the first 8 bytes contain the size of the remaining message body. The code looks something like this: data_to_send = struct.pack("Q",…
Broteen Das
  • 386
  • 4
  • 12
0
votes
1 answer

How to preserve bytesobjects in a dataframe column through HTTP server in python3?

I have a pandas dataframe. The 'data' column contains bytes bojects (binary files) df = pd.DataFrame({'file_hash' : [01ccba93f3647ca50..., 739b24dc0dfea....], 'data' : [b'x\x9cd\xbbuT\x1c\xc1\xb7-\xdc\xf8 A\x12\xdc...,…
Sam11
  • 63
  • 6
0
votes
0 answers

Create PDF from InputStream / ByteArray - Corrupted PDF in Adobe

I'm trying to solve a problem with generating a pdf from an inputStream or byte array. The file being opened in Adobe Reader is corrupted. When I set Chrome as my default pdf reader it opens normally, and if I save "Save as" from the browser and…
0
votes
0 answers

How to transmit in REACT a real-time video feed?

I'm building a website using REACT the purpose of which is to show a real-time simulated video feed. I'm a novice developer and I'm stuck on this problem for a while. Therefore, your help will be greatly appreciated! For more details please read…
0
votes
1 answer

Problem with Python code to send data from Mac to Arduino

thanks in advance for any help on this. I am writing some code to send data from a Mac to an Arduino board so that I can program a flash memory device. I have a Python program which negotiates a link to the arduino board and then should send 256…
Roman
  • 11
  • 4