# FasterCSV 0.2.0 -- The user requests release!

**URL:** <https://www.ruby-forum.com/t/fastercsv-0-2-0-the-user-requests-release/56628>\
**Category:** Ruby\
**Created:** [April 1, 2006, 10:42pm UTC](https://www.ruby-forum.com/t/fastercsv-0-2-0-the-user-requests-release/56628 "2006-04-01T22:42:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bbazzarrakk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/47e85d/32.png) [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Post date:** [April 1, 2006, 10:42pm UTC](https://www.ruby-forum.com/t/fastercsv-0-2-0-the-user-requests-release/56628/1 "2006-04-01T22:42:28Z")

</div>

# FasterCSV 0.2.0 Released

FasterCSV has a ton of new features from requests (some even provided  
patches) by you! It’s very hard for me to pick what to show off  
here, but if I had to pick two favorites it would be using an Array  
of headers and the new shortcut interface.

Since 0.1.6, FasterCSV has allowed named access for columns. Now you  
can say goodbye to indexes altogether as Dakshinamurthy K. has  
sent in a patch allowing you to specify an Array of headers to use  
for any document. Just setup the headers when you create the  
instance and it’s nothing but names you’ll have to worry about from  
then on.

Ara.T.Howard also sent in a patch for a short but powerful interface  
extension. Check this out:

FCSV { |csv\_out| csv\_out \<\< %w{my data here} } # to  
STDOUT  
FCSV(csv = “”) { |csv\_str| csv\_str \<\< %w{my data here} } # to a  
String  
FCSV(STDERR) { |csv\_err| csv\_err \<\< %w{my data here} } # to  
STDERR

You can wrap IO objects with that, change options, or whatever. It  
also caches the instance so subsequent calls won’t invent another  
FasterCSV object.

There’s a lot more in this release though, including serialization  
similar to what Hal F. described in his metaprogramming article  
and a CSV compatibility layer for easy transitioning.

If you work with CSV data, you want to download this release, trust me!

## 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:

1. Be significantly faster than CSV while remaining a pure Ruby  
library.
2. Use a smaller and easier to maintain code base. (We’re about  
even now,  
but not if you compare the features!)
3. Improve on the CSV interface.

## What’s New?

(highlights from the CHANGELOG)

- Made FasterCSV#lineno CSV aware.
- Added line numbers to MalformedCSVError messages.
- :headers can now be set to an Array of headers to use.
- :headers can now be set to an external CSV String of  
headers to use.
- Added an :unconverted\_fields options, so those can be  
returned  
when needed.
- Provided support for the serialization of custom Ruby objects using  
CSV.
- Added CSV drop-in interface.
- Added header information to FieldInfo Struct for conversions by  
header.
- Added an alias to support require “fastercsv”.
- Added FasterCSV::instance and FasterCSV()/FCSV() shortcuts for easy  
output.

## Migrating from CSV to FasterCSV?

The README includes a section on the differences and you can read  
that here:

[http://fastercsv.rubyforge.org/](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](http://fastercsv.rubyforge.org/classes/FasterCSV.html)

For quick and dirty switching, try:

begin  
require “faster\_csv”  
FasterCSV.build\_csv\_interface  
rescue LoadError  
require “csv”  
end

# … use CSV here …

If FasterCSV isn’t meeting your needs, I want to here about it:

removed\_email\_address@domain.invalid

## Where can I learn more?

FasterCSV is hosted on RubyForge.

Project page: [http://rubyforge.org/projects/fastercsv/](http://rubyforge.org/projects/fastercsv/)  
Documentation: [http://fastercsv.rubyforge.org/](http://fastercsv.rubyforge.org/)  
Downloads: [http://rubyforge.org/frs/?group\_id=1102](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](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=4758](http://rubyforge.org/frs/?group_id=1102&release_id=4758)

James Edward G. II

---

<div class="post-metadata">

**Author:** ![bbazzarrakk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/47e85d/32.png) [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Post date:** [April 2, 2006, 4:45pm UTC](https://www.ruby-forum.com/t/fastercsv-0-2-0-the-user-requests-release/56628/2 "2006-04-02T16:45:15Z")

</div>

Awesome, thank you!
