Questions tagged [buffer]

A buffer is an area of memory set aside for temporary storage of data while it is being moved from one place to another. This is typically done to speed up processes with significant latency, such as writing to a disk, printer or other physical device. The output is ready to be sent to the device before the device is ready to accept it, so it is moved to the buffer so that the sending program does not have to continue waiting.

A may be used when moving data between processes within a computer. This is comparable to buffers in telecommunication. Buffers can be implemented in a fixed memory location in hardware—or by using a virtual data buffer in software, pointing at a location in the physical memory. In all cases, the data stored in a data buffer are stored on a physical storage medium. A majority of buffers are implemented in software, which typically use the faster RAM to store temporary data, due to the much faster access time compared with hard disk drives. Buffers are typically used when there is a difference between the rate at which data is received and the rate at which it can be processed, or in the case that these rates are variable, for example in a printer spooler or in online video streaming.


References

7035 questions
2
votes
0 answers

pygame Sound module for realtime synthesis

There's a python sounddevice module, which is able to synthesize a realtime audio signal frames and blocks on demand as a function of current frame time. The example usage is on the rtd:…
JonnyRobbie
  • 526
  • 5
  • 16
2
votes
1 answer

Is it possible to add varying buffer based on attribute in geopandas?

I have the following GeoSeries: print(zambia_grid) voltage_kV, geometry, buffer_value 88.0, MULTILINESTRING ((662448.559 8288872.590, 6625..., 660.0 132.0, MULTILINESTRING…
four_loops
  • 235
  • 1
  • 2
  • 9
2
votes
0 answers

Seamless Buffered Memory - Disc Data Object Thingy

Sorry this should be a google question but im just getting pages of results about hard drives etc! is there such a thingy for javascript / node.js that will allow a large data collection to be accessed in memory but automatically buffered off to…
Coops11
  • 21
  • 1
2
votes
1 answer

Linux: will file reads from CIFS be cached in memory?

I am writing a streaming server for linux that reads files from CIFS mounts and sends them over a socket. Ideally, linux will cache the file in memory so that subsequent reads will be faster. Is this the case? Can I tell the kernel to cache network…
Jacko
  • 12,665
  • 18
  • 75
  • 126
2
votes
1 answer

convert nodejs buffer to Uint16Array

I would like to convert a buffer to Uint16Array I tried: const buffer = Buffer.from([0x00, 0x01, 0x00, 0x02, 0x01, 0x00, 0x12, 0x34]) const arr = new Uint16Array(buffer) console.log(arr) I expect [0x0001, 0x0002, 0x0100, 0x1234] but I get [0x00,…
Yukulélé
  • 15,644
  • 10
  • 70
  • 94
2
votes
0 answers

Kotlin Fuel Increase buffer size

I'm using fuel to make some http requests for large blobs of JSON. In this particular case I know I'm always going to receive 100s of kilobytes of JSON and never anything smaller. I've noticed the buffersize on the input stream from responses is…
John
  • 65
  • 5
2
votes
0 answers

Fluent ffmpeg stream from buffer

I have a function streamtogif() with ffmpeg that converts a stream to a gif and returns a buffer. It works perfectly fine, but here I am, I'm using busboy, and i get the entire file as buffer. Finally, I'd like to pass this one to the ffmpeg to turn…
nonoom
  • 244
  • 1
  • 3
  • 15
2
votes
2 answers

SSIS 2019 AutoAdjustBufferSize causes buffer allocation error

To increase my ETL performance, I have enabled "AutoAdjustBufferSize" property on my data flow tasks. However, it is not allocating enough buffer to the memory I need. Check out what SSIS tells me... Information: The buffer manager failed a memory…
Wichie Artu
  • 85
  • 1
  • 9
2
votes
1 answer

Why does a string of length 3 have 3 as its byte length?

When javascript encodes one character as 2 bytes or more, why does the following: Buffer.from("abc").byteLength output 3? Should not it be 6?
Amanda
  • 2,013
  • 3
  • 24
  • 57
2
votes
1 answer

Wait after every read of a chunk of data - Node JS

I have my following code: var fs = require('fs'); var myReadStream = fs.createReadStream('readMe.txt') myReadStream.on('data', function(data_chunk){ setTimeout(function(){ console.log('chunk read:') console.log(data_chunk) …
2
votes
1 answer

Why / when is cout buffer automatically flushed?

I understand from here that if i were to output characters without flushing the buffer ( with endl or cin ) they wouldn't appear on my console until the program ends. So i tried to make an infinite loop: for(;;) { std::cout << "a" <<…
Cătălina Sîrbu
  • 1,253
  • 9
  • 30
2
votes
2 answers

Using .data() to turn a character array to a std::string doesn't convert the entire array

I declared a large character array and then I subsequently read from a socket to populate it. boost::array buf{} size_t len = boost::asio::read(socket, aio::buffer(buf, 32841)); If I print out len I correctly get 32841 and when I loop…
peachykeen
  • 4,143
  • 4
  • 30
  • 49
2
votes
3 answers

Problem with string overflow with strtok

I have a file of data: C0001|H|Espresso Classics|The traditional espresso favourites. C0002|H|Espresso Espresions|Delicious blend of espresso, milk, and luscious flavours. C0003|H|Tea & Cocoa|Gloria Jean's uses only the finest cocoas and single…
Chris
  • 7,996
  • 11
  • 66
  • 98
2
votes
1 answer

How does one decode bytes from QR code in Java?

Imagine I've got this example Node buffer Buffer.from([1,2,3]) which I've encoded into a QR code as specified by the qrcode npm package's documentation. const buffer = Buffer.from([1, 2, 3]); QRCode.toFile(`public/images/${product.name}.png`, [{…
Miguel Mano
  • 103
  • 1
  • 12
2
votes
5 answers

ido-switch-buffer and bury-buffer

I've recently started using ido-mode, which, overall, is pretty nice. But one thing seems especially broken, and I'm wondering if there's a setting (ha) buried in there to fix it. ido-switch-buffer doesn't seem to care about buried buffers. That…
Ken
  • 5,074
  • 6
  • 30
  • 26
1 2 3
99
100