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

Regular expression parsing (streaming) a binary file?

I'm trying to implement a strings(1)-like function in Python. import re def strings(f, n=5): # TODO: support files larger than available RAM return re.finditer(br'[!-~\s]{%i,}' % n, f.read()) if __name__ == '__main__': import sys …
0
votes
2 answers

Read Bytes from Request Content

var bytes = Request.Content.ReadAsByteArrayAsync().Result; hello, is there any other method that read bytes from content? expect this one
0
votes
0 answers

Unexpected Null value while getting bytes from readStream of file picker | Flutter Web

i have tried multiple solutions but stuck to solve how do i get full image bytes which is only possible by readStream.listen but unable to solve. Future pickImage()async { List bytes = []; var result = await…
HKTareen
  • 51
  • 5
0
votes
1 answer

Python3 interpret user input string as raw bytes (e.g. \x41 == "A")

I want to accept user input from the command line using the input() function, and I am expecting that the user provides input like \x41\x42\x43 to input "ABC". The user MUST enter input in the byte format, they can not provide the alphanumeric…
BitWrecker
  • 174
  • 1
  • 10
0
votes
1 answer

How can i translate these bytes to float?

\x00 \x16 7G \x8d \xed 6G \x1a \x16 7G \x00 \x16 7G 5E 7G These is BTCUSDT PRICE data.. so maybe presented like 44xxx.xxx 45xxx.xxx. How can this number make? I can't understand. What i only know is \x is hexnumber and others are maybe ASCII CODES.
0
votes
1 answer

How to convert [u8] to [u32]?

I wanted to embed an image to my binary and used the "include_bytes" macro. The GUI library I wanted to use only accepts [u32] for input and the said macro produces only [u8]. How do I convert a [u8] to a [u32]? I've seen some in the internet but…
amviel
  • 1
  • 1
0
votes
1 answer

Node JS read the byte stream file and store it in storage

I am user NodeJS and Express to run a microservice. This microservice(ms1) make a request to another microservice(ms2) to get a file(XLSX). The problem here is, the response of ms2 is a byte stream. I want to read those byte stream response in node…
0
votes
0 answers

How to set PDF open page number from PDFMergerUtility

I am merging PDF content using PDFMergerUtility in Java. PDFMergerUtility bundle= new PDFMergerUtility(); bundle.addSource(new ByteArrayInputStream(contentService.retrieveData(transaction1); bundle.addSource(new…
0
votes
0 answers

Data gets unexpectedly truncated while sending over sockets

I am trying to send an image from a client to the server, using python sockets. The problem is the entire image gets sent only occasionally, and fails most of the times. Here is a summary of what I’m doing: First I load an image from a file on the…
xxSirFartAlotxx
  • 394
  • 1
  • 11
0
votes
1 answer

Parsing a JSON Byte Stream Returned from a Web Request using Powershell without writing to a file

I'm using the following Powershell to call a URL that returns a JSON file. (If you were to paste the URL into the browser it would download a file, rather than display the raw JSON): $fileName = "output.json" $url =…
James Wiseman
  • 29,946
  • 17
  • 95
  • 158
0
votes
0 answers

How to Fetch an excel File from an API in Android

I have a task to fetch an excel file from an endpoint and display it on the android app. When I ran the endpoint with Postman, I got a response of this nature: PK ���� I have not done something of this before. Please can someone explain the data…
0
votes
1 answer

How to pass a memory stream to javascript as a string

I'm mounting a zip file using a MemoryStream. I know how to download this file using postback. But I want to pass the contents of the Memory Stream to a Callback and download it in javascript code. When I try to do this what happens is that the zip…
0
votes
0 answers

Equivalent to readRawData from C++ in Python

In C ++ there is a readRawData function that helps to read the byte stream in a file. For example: stream->readRawData(layerName, 64); So I have 64 bytes to read the layer name. After these 64 bytes, I want to read the…
user2962768
  • 121
  • 1
  • 3
  • 10
0
votes
1 answer

Difference between calculation of from_bytes vs. unpack

I've been trying to figure out why this byte array leads to different results using two approaches: print(msg[16:20]) >>> b'\xe4\x86\xaaU' msg[16:20].hex() >>> e486aa55 print(int.from_bytes(msg[16:20], byteorder='big', signed='False')) >>>…
Co17D
  • 3
  • 1
0
votes
0 answers

Docker images which can handle multiple requests at the same time

Unfortunately, I'm not really familiar with Linux and Docker. But maybe someone from you can help me. I need a lightweight Docker image that can do multiple byte stream conversions (e.g. encoding, encryption, compression, ...) in parallel. The…
André K
  • 41
  • 9