FasterCSV 0.1.6 Released
The first couple of releases brought raw speed and plenty of it.
This release puts all those spare cycles to work with a ton of new
data-centric features.
Want to access you CSV files by the names of the header rows or get
back real data objects instead of just Strings? Then this release
has what you need.
This release also fixes the number one complaint with automatic line
ending detection (now the default).
What is FasterCSV?
(from the README)
FasterCSV is intended as a replacement to Ruby’s standard CSV
library. It was designed to address concerns users of that library
had and it has three primary goals:
- Be significantly faster than CSV while remaining a pure Ruby
library. - Use a smaller and easier to maintain code base. (We’re about
even now,
but not if you compare the features!) - Improve on the CSV interface.
What’s New?
(highlights from the CHANGELOG)
- Added built-in and custom data converters. Built-in handle numbers
and dates. - Added Array#to_csv and String#parse_csv. Both accept normal options.
- Added auto-discovery for :row_sep (now the default).
- Added FasterCSV::filter() for easy Unix-like CSV filters.
- Added support for accessing fields by headers.
- Headers can have their own converters.
- Headers can be skipped or returned as needed.
- FasterCSV::Row allows index or header access while retaining
order and
allowing for duplicate headers.
Migrating from CSV to FasterCSV?
The README includes a section on the differences and you can read
that here:
http://fastercsv.rubyforge.org/
You call also see general usage in the documentation of the
interface, right here:
http://fastercsv.rubyforge.org/classes/FasterCSV.html
If FasterCSV isn’t meeting your needs, I want to here about it:
Where can I learn more?
FasterCSV is hosted on RubyForge.
Project page: http://rubyforge.org/projects/fastercsv/
Documentation: http://fastercsv.rubyforge.org/
Downloads: http://rubyforge.org/frs/?group_id=1102
How do I get FasterCSV?
FasterCSV is a gem, so as long as you have RubyGems installed it’s as
simple as:
$ sudo gem install fastercsv
If you need to install RubyGems, you can download it from:
http://rubyforge.org/frs/?group_id=126&release_id=2471
FasterCSV can also be installed manually. Just download the latest
release and follow the instructions in INSTALL:
http://rubyforge.org/frs/?group_id=1102&release_id=4438
James Edward G. II