Main Page   Compound List   Compound Members  

yEnc PHP Class

Introduction

yEnc is an informal standard for efficiently encoding binary files for transmission on Usenet, in email, and in other similar mediums. It is more efficient than other widely-used encoding methods, resulting in smaller files (which in turn results in smaller downloads, which makes people happy).

This class implements a working yEnc encoder and decoder according to the yEncode working draft specification as of version 1.3, which can be found at http://www.yenc.org/yenc-draft.1.3.txt

The only part of the yEnc spec that this class does not implement is encoding and decoding of multipart yEncoded binaries. Support for this may be added at a later date, but don't get your hopes up.

Limitations of PHP

PHP is not an ideal language for implementing something like this. The main issue is speed. The first thing you'll notice when you use the class is that it is incredibly slow. Despite the fact that the calculations involved are very simple, and as optimized as they can possibly be, the problem is that there are just a lot of them, and PHP is not a speedy language.

If you want a fast yEnc implementation, you should use C.

So why, then, did I write this class? I don't know really. I was bored. It's entirely possible that it could come in handy for dealing with very small binary files in a PHP-only environment. Mostly, I just like toying with new concepts.

Support & Contact Info

If you find a bug, or if you have a suggestion or comment, I'd love to hear from you. If you need someone to hold your hand, please don't waste my time. I went to a lot more trouble than I probably should have making this class extremely easy to use, and I've also done my best to provide thorough documentation, so stupid questions will very likely be met with anger and profanity.

That said, you can contact me via email at ryan@wonko.com and you'll always be able to find the latest version of this class and its documentation at http://wonko.com/yenc/

License & Copyright

Copyright (c) 2003 Ryan Grove. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


Generated on Mon Mar 31 17:29:56 2003 for yEnc PHP Class by doxygen1.3-rc2