All Questions
239
questions
0
votes
1
answer
20
views
In node, is a readable file stream just a buffered, asynchronous read "under the hood"?
I'm wondering, if I were to dive into the stream code, would I find deep down that for a readable file stream what is basically happening is that data is being asynchronously read into a buffer which ...
1
vote
1
answer
90
views
Can't get DirectX 12 Vertex Buffer Output Stream working (results are full of zeros)
I've been having trouble trying to implement DirectX 12 vertex buffer output stream to get the world transformed vertex positions. I almost have it working - it does everything no errors but it ...
0
votes
0
answers
109
views
How to properly handle byte buffers from C to Ada?
I'm trying to create a simple Ada program that would encrypt/decrypt files using the OpenSSL libcrypto library. One of the issues I'm facing is handling output streams properly. Trying to achieve ...
0
votes
0
answers
35
views
Implement a minimum flush size for io.BufferedWriter in Python
I'm extending the BufferedWriter class from the io module and so far it looks something like this:
class MyBufferedWriter(io.BufferedWriter):
@classmethod
def open(cls, config, buffer_size=...
0
votes
1
answer
138
views
How to translate Python's BytesIO function to Node.js/TypeScript?
I am currently in the process of merging my Python backend with a Svelte frontend using Svelte-Kit with the Node.js adapter. I have a media file as a Buffer and I am trying to figure out how to keep ...
0
votes
0
answers
1k
views
How to stream chunks of local files into client components in Next.js?
I am trying to stream chunks of data from a local file to a client component in Next.js
In the client component, I am using fetch to call a GET request from a Next.JS route, which creates a readable ...
0
votes
0
answers
172
views
gstreamer - retain buffer offset over RTP
Im trying to create gst pipelines to send a video over rtp, with some identifier for each frame, so that the pipeline receiving them will be able to know which frame is which.
the puropse of this is ...
1
vote
0
answers
515
views
Using multer and stream to save file in google cloud storage
I'm doing my best to upload a file directly to google cloud storage, using koa.js and multer.
I carefully read through the other SO questions, google api documentation and several tutorials and was ...
0
votes
1
answer
89
views
How to "fork" an AsyncReader into two in Rust?
I'm currently working on implementing a TCP proxy in Rust that can detect the server name in HTTPS connections and decide which proxy to use based on it. Specifically, I need to copy data from a ...
0
votes
1
answer
1k
views
Readable to Buffer function doesn't work because Readable doesn't emit `end` event
So I have a typical streamToBuffer function:
const streamToBuffer = async (stream: NodeJS.ReadableStream): Promise<Buffer> => {
const chunks: Buffer[] = [];
return new Promise((resolve, ...
-1
votes
1
answer
301
views
How can i get body from res of express ServerResponse [Autodesk forge]
It seems like stream but i just wanna read that res.body.id from that
but can't able to JSON.parse or JSON.stringify because that is like ServerResponse [object]
// can't even read as a stream also
...
1
vote
2
answers
1k
views
get pdf from axios utility in node.js
I have created a utility function which is supposed to be common for all the api requests in node.js express app.
function axiosCall(method, endpoint, body) {
let requestConfig = {
url: ...
1
vote
0
answers
167
views
How is the internal buffer of a readable node stream working?
Is there any explanation of the following behavior that seems to contrast with the official Node streams documentation?
In Node REPL (v16.17.0):
> s=stream.Readable.from('a')
> s._readableState....
0
votes
1
answer
260
views
How to buffer a stream in a functional programming?
I'm trying to do realtime audio processing in functional programming (in rust, but this is not the point).
So my idea is to take the inputs samples from a library called cpal (it reads the default ...
0
votes
2
answers
1k
views
Convert downloaded buffer to readable text in node
I'm trying to download a series of csv files from a website and concatenate them into one big file. The output of each file starts with:
Number of records: x
Header row
record 1
record 2
....
I'm ...