Projects / Vstr string library

Vstr string library

Vstr is a safe and fast string library for C. It is designed for network communication. Its design uses chunks of ptr+length data, so adding, substituting, and deleting data are all fast operations. This model also allows it to do automatic referencing for mmap() areas of memory. Shortcut APIs are included to mmap() a file into a Vstr string, and read()/write() data to/from a Vstr string. Another big feature of the library is a POSIX and ISO 9899:1999 compliant printf() like function, which can also be extended with user supplied formatters that are gcc warning compatible. The total API is over 280 functions, but laid out in a easy to remember manner, including data parsing functions, a non-destructive split() function, and conversion functions (among others).

Operating Systems

Recent releases

  •  07 Mar 2006 06:36

    Release Notes: Bytemap functions were added to accelerate parsing. Custom formatters were sped up with a hash. Workarounds were added for a hidden Linux UIO 2GB limit and GCC 4.x symbol aliasing brain damage. Solaris build fixes were made along with a fix for a problem with loading zero-sized files with vstr_sc_*_file() and a couple of other minor problems.

    •  10 Jan 2005 12:23

      Release Notes: Some corner case bugs found in applications were fixed. Unit testing is still at 100% code coverage. Some minor tweaks were made to make the API friendlier. The HTTPD example application should now be faster, HTTP/1.1 compliant, secure from remote attacks, able to stop response splitting, and able to employ gzip content-encoding. Build fixes were made for non-Linux platforms.

      •  30 Aug 2004 09:09

        Release Notes: Additional unit testing code was added, giving 100% code coverage that tests every line of code in the library. Some functions were added to assist with working with binary data, using iterators, doing user friend byte output with large numbers, and working with things like gmp. The build system is now much nicer with the examples being built by default, compilation on FreeBSD working by default, and LFS support being more developer friendly. Some work was made on the RPMs.

        •  26 Jan 2004 11:30

          Release Notes: This release adds more testing (now at over 99% code coverage), fixes one large bug and a couple of smaller bugs, adds a few functions for storing constant data in the configuration, and now internally uses a group allocator for Vstr_ref for some operations.

          •  15 Dec 2003 14:52

            Release Notes: The output using vstr_sc_fmt_add_ptr() was fixed, as the wrong type was used for vstr_sc_fmt_cb_beg(). vstr_export_chr() was changed to make it easier to optimize for GCC. Custom formatters now accept %d instead of the field width or precision in the static format checkers compat. Build fixes were made for Cygwin, 64-bit architectures, and ICC. Debug mode no longer raises false errors when changing certain configuration values to be externally allocated.


            Project Spotlight


            A Fluent OpenStack client API for Java.


            Project Spotlight

            TurnKey TWiki Appliance

            A TWiki appliance that is easy to use and lightweight.