Permalink
Browse files

Add README and change license to MIT.

  • Loading branch information...
1 parent 89e8714 commit ce759d8462e9b9b6e9e3b7bc82d5ef49e1866af9 @FooBarWidget committed Jul 6, 2010
Showing with 53 additions and 2 deletions.
  1. +18 −2 LICENSE
  2. +35 −0 README.markdown
View
20 LICENSE
@@ -1,3 +1,19 @@
Copyright (c) 2010 Hongli Lai
-You are not allowed to distribute this stuff until I've put a proper
-open source license on this.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
View
@@ -0,0 +1,35 @@
+What is it?
+===========
+An simple, efficient parser for multipart MIME messages, based on
+[Formidable's](http://github.com/felixge/node-formidable) parser.
+
+Why?
+----
+MIME multipart messages are a total pain to parse because the grammar is
+so insane. Furthermore, the MIME specification is incredibly large. This
+has led to an army of equally large and complex MIME libraries. If you
+just want to parse a MIME multipart message without hassle then using all
+of those libraries are less than ideal. They all tend to handle the kitchen
+sink (e.g. they handling email parsing and all kinds of other stuff you don't
+need) or they depend on other libraries that you may not want (e.g. APR, glib)
+or they are under-documented or under-tested or just not efficient (e.g.
+buffering all data in memory; good luck parsing a 2 GB file upload). You can
+write your own parser but because the multipart grammar is so much of a pain
+it's very easy to make mistakes.
+
+Goals and highlights of this parser
+-----------------------------------
+
+ * Multipart parsing, and only multipart parsing.
+ * Event-driven API.
+ * No dependencies on any external libraries, just straight C++ with STL.
+ * Efficient. Nothing in the input is buffered except what's absolutely
+ necessary for parsing.
+ * Only one level of multipart parsing. A multipart message part can itself
+ be a multipart message, but this parser doesn't attempt to provide a
+ complex API for handling nested multipart messages. Instead the developer
+ should just use another parser instance to parse nested messages.
+ * No I/O is handled for you. So this parser won't depend on any particular
+ I/O library or even any particular operating system's I/O API and won't
+ block on I/O by itself, giving you full control.
+ * Not thread-safe, but reentrant. No dependencies on any threading libraries.

0 comments on commit ce759d8

Please sign in to comment.