3 ms·
Then you have to read part of the file, read some size fields, make a struct on the stack (for an image file??), copy the stuff you've read in already into that
by SamReidHughes 8y ago
Then you have to read part of the file, read some size fields, make a struct on the stack (for an image file??), copy the stuff you've read in already into that struct, and keep reading. And you now need to define how to pass a pointer of that struct type to helper functions for operating on a PNG.
- burfog 8y agoI mean for generating a PNG file, not reading one. It's not the best example I'm sure; it's just what popped into my head. If you prefer, it's an Ethernet packet, with a CRC16 on the end. It is outbound. The send() and write() functions are happy to accept a void pointer.