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
1 answer

the importance of buffersize

While streaming big files (more than 150mb) with ASP.NET, to what should the buffersize be set? I use 16kb as default. Does making the buffersize bigger (for example 320kb) increase performance and decrease server load?
moreless
  • 107
  • 1
  • 8
2
votes
2 answers

What is the difference between fread(&buffer...) and fread(buffer...)

I'm trying to read from a file and copy it to another file. I am reviewing some codes online and I seem to notice that some declare fread this way: fread (buffer, 1, 1000, src) some this way fread (&buffer, 1, 1000, src) Let's say I have already…
M Tiz
  • 21
  • 2
2
votes
1 answer

fwrite() writes the amount that i'm expecting but not the data that i want

My task is to copy JPEGs from a file the intend here is to find the JPEGs and create a new file to put it, all JPEGs are store back to back and the "identifier" is always in the beggining of a 512 BYTE block. my problem shows only in the first file…
cloud
  • 23
  • 3
2
votes
2 answers

php flush not working

My flush mechanism stopped working, i'm not sure why. I'm trying to run a simple flush example now, with no luck: echo "before sleep"; flush(); sleep(5); echo "after sleep"; after doing some reading, and understanding ngin x was was installed on my…
normalppl
  • 297
  • 2
  • 12
2
votes
1 answer

vulkan pushConstant vs uniform buffer update

So I am reading the vulkan book now and got a problem about the push Constant and ubo update. After I set up all the pipeline and descriptor stuff. Basically I just need the copy the buffer to the UBO buffer such as memcpy then I am done. Basically…
caxieyou110
  • 517
  • 1
  • 4
  • 8
2
votes
1 answer

getchar() and input buffer

an example from a book: #include
Aiden Choi
  • 142
  • 7
2
votes
0 answers

Inverse operation of blob.text()

Why does the following code produce 2 different values for the array buffers? How would the text representation of a blob need to be encoded/processed to allow conversion to and from a blob via it's text representation? const input = new…
Kilian
  • 1,540
  • 16
  • 28
2
votes
2 answers

How to use Combine to send async accelerometer updates to server

My goal is to send async accelerometer readings to a server in periodic payloads. Accelerometer data continues while offline and concurrently during the network requests, so I'll need to handle network failures as well as data that arrives during…
M-P
  • 4,909
  • 3
  • 25
  • 31
2
votes
1 answer

How do I get the size of an image represented as a Unit8Array?

I have an array of bytes of the user's avatar picture. It represented as typed Unit8Array() const imageBytes = new Unit8Array(...); Now I need to check the image size for setting some limitations to prevent the user from putting massive images, but…
user15307601
2
votes
1 answer

Loading generated texture data is inconclusive in Libgdx/Lwjgl

The following data format: final int width = 256; final int height = 256; final float[][][] data = new float[width][height][4]; FloatBuffer dataBuf; int textureHandle; FrameBuffer testFrame; @Override public void create () { for (int i = 0; i <…
Dávid Tóth
  • 2,788
  • 1
  • 21
  • 46
2
votes
0 answers

System.Reactive: time-based buffer by Timestamp field

I am using Reactive library in my C# project to group data according to configured policies. All these data implement the following interface public interface IPoint { object Value { get; } DateTimeOffset Timestamp { get; } } One of the…
maradev21
  • 576
  • 2
  • 6
  • 20
2
votes
2 answers

Node typescript lacks a construct signature (new Buffer)

Im my node + typescript application I have the following code. const base64Data = new Buffer.from(url, 'base64'); Here it gives the following error. 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. I have…
Shashika Virajh
  • 8,497
  • 17
  • 59
  • 103
2
votes
1 answer

Cocoa Touch Bonjour how to deal with NSNetService addresses and uint8_t

I'm attempting to make an iOS app communicate with a server that uses Bonjour and uses HTTP commands. So far I have been able to find the local domain and locate the particular service I'm looking for. I am able to resolve the address of the…
markv12
  • 334
  • 1
  • 11
2
votes
0 answers

How to concate messages sent from smpp client using udh in NodeJS

i am developing a sms gateway where i developed a smpp server. One of my client want to send message using a 3rd party tool. Everything is working fine. Except one. If client send long message more then 254 octets then short_message parameter…
2
votes
1 answer

help with inotify C script

Source I've never used C before. this script adds a listener onto a directory and notifies the user by echoing to the terminal and then exiting whenever a file event happens. I want to modify the script to NOT exit but instead continuing monitoring…
lollercoaster
  • 15,969
  • 35
  • 115
  • 173