pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/moritzrinow/cStream

://github.githubassets.com/assets/primer-70be7debc79a8eff.css" /> GitHub - moritzrinow/cStream: C byte-stream and serialization utils · GitHub
Skip to content

moritzrinow/cStream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cStream

C byte-stream and serialization utils

Content

  • Build
  • Usage

Build

Clone the repository with git...

Linux

Open the terminal in the repo directory and type:

"make" to install cStream

"make clean" to uninstall cStream

Windows

I have not added a way to build binaries for Windows yet... Just add the source files to your VS Solution/Project.

Using streams

The structure

STREAM stream;

Initialize

stream_init(&stream , 0) // (stream, capacity)

_init(&stream, 0) // Macro

Reserve memory

stream_reserve(&stream, 1024) // (stream, size)

_reserve(&stream, 1024) // Macro

Write (overwrite)

stream_write(&stream, some_byte_buffer, length, 0) // (stream, buffer, length, offset)

_write(&stream, some_byte_buffer, length, 0) // Macro

Write (insert)

stream_insert(&stream, some_byte_buffer, length, 0) // (stream, buffer, length, offset)

_insert(&stream, some_byte_buffer, length, 0) // Macro

Read

stream_read(&stream, some_byte_buffer, length, 0) // (stream, buffer, length, offset)

_read(&stream, some_byte_buffer, length, 0) // Macro

Seek (change position)

stream_seek(&stream, 0) // (stream, position)

_seek(&stream, 0) // Macro

Clear (reset)

stream_clear(&stream) // (stream)

_clear(&stream) // Macro

Copy

stream_copy(&stream, &some_other_stream) // (source_stream, dest_stream)

_copy(&stream, &some_other_stream) // Macro

Close (cleanup resources)

stream_close(&stream) // (stream)

_close // Macro

The macros are available if you define _STREAM_MACROS before including cStream.h

Releases

No releases published

Packages

 
 
 

Contributors

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy