r/cprogramming • • Mar 19 '26
I created an SIMD optimized PPM image manipulation library in C a while ago to gain reputation. I also created a linux kernel isochronous USB driver for a physical microphone i have. I also have a ring buffer implementation in C if anyone's interested.
[deleted] — view deleted post
13
Upvotes
View all comments
Show parent comment
1
u/DaCurse0 Mar 19 '26
id write to a preallocated buffer (global or stack that will fit the max size header)
then write it to the file (snprintf tells you how much it wrote / it null terminates)