FasterCSV

FasterCSV is a Ruby library created as a complete replacement to the CSV standard library.
Download

FasterCSV Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • James Gray
  • Publisher web site:
  • http://rubyforge.org/projects/fastercsv/

FasterCSV Tags


FasterCSV Description

FasterCSV is a Ruby library created as a complete replacement to the CSV standard library. FasterCSV is a Ruby library created as a complete replacement to the CSV standard library. It is significantly faster and smaller while still being pure Ruby code. It also strives for a better interface.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. (FasterCSV is larger now, but considerably richer in features. The parsing core remains quite small.)3. Improve on the CSV interface.What's Different From CSV?I'm sure I'll miss something, but I'll try to mention most of the major differences I am aware of, to help others quickly get up to speed:CSV Parsing· FasterCSV has a stricter parser and will throw MalformedCSVErrors on problematic data.· FasterCSV has a less liberal idea of a line ending than CSV. What you set as the < tt >:row_sep< /tt > is law.· CSV returns empty lines as < tt >< /tt >. FasterCSV calls them < tt >[]< /tt >.· FasterCSV has a much faster parser.Interface· FasterCSV uses Hash-style parameters to set options.· FasterCSV does not have generate_row() or parse_row() from CSV.· FasterCSV does not have CSV's Reader and Writer classes.· FasterCSV::open() is more like Ruby's open() than CSV::open().· FasterCSV objects support most standard IO methods.· FasterCSV has a new() method used to wrap objects like String and IO for reading and writing.· FasterCSV::generate() is different from CSV::generate().· FasterCSV does not support partial reads. It works line-by-line.· FasterCSV does not allow the instance methods to override the separators for performance reasons. They must be set in the constructor.About Ruby:Ruby is a dynamic, reflective, general purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features. Ruby originated in Japan during the mid-1990s and was initially developed and designed by Yukihiro "Matz" Matsumoto.Ruby supports multiple programming paradigms (including functional, object oriented and imperative), and features a dynamic type system and automatic memory management; it is therefore similar in varying respects to Python, Perl, Lisp, Dylan, and CLU.In its current, official implementation, written in C, Ruby is a single-pass interpreted language. As there is currently no specification of the Ruby language, this implementation is considered the de facto reference. As of 2008, there are a number of alternative implementations of the Ruby language, including Rubinius, JRuby, YARV, and IronRuby, each of which takes a different approach, with JRuby providing just-in-time compilation functionality.The language was created by Yukihiro Matsumoto, who started working on Ruby on February 24, 1993, and released it to the public in 1995. "Ruby" was named as a gemstone because of a joke within Matsumoto's circle of friends alluding to the name of the Perl programming language.As of December 2007, the latest stable version of the reference implementation is 1.8.6. Apart from the reference, several other virtual machines are being developed for Ruby. These include JRuby, a port of Ruby to the Java platform, IronRuby, an implementation for the .NET Framework produced by Microsoft, and Rubinius, an interpreter modeled after self-hosting Smalltalk virtual machines. Requirements: · Ruby


FasterCSV Related Software