I have some files that are uuencoded, and I need to decode them, using either .NET 2.0 or Visual C++ 6.0. Any good libraries/classes that will help here? It looks like this is not built into .NET or MFC.
3 Answers
Code Project has a .NET library + source code for uuencoding/decoding. The actual algorithm itself is quite widely disseminated over the web and is quite short.
The Code Project link: http://www.codeproject.com/KB/security/TextCoDec.aspx
Short intro from the article:
This article presents a class library for encoding/decoding files and/or text in several algorithms in .NET. Some of the features of this library:
Encoding/decoding text in Quoted Printable Encoding/decoding files and text in Base64 Encoding/decoding files and text in UUEncode Encoding/decoding files in yEnc

- 15,655
- 7
- 50
- 82
Try uudeview, here. It is an open source library which works well and will also handle yenc files in addition to uuencoded ones. You can use it with C/C++ or write an interop wrapper for C# without much trouble.

- 2,225
- 16
- 8
-
Just to clarify, this is C code. Also, the author seems to have taken both UUEncoding and writing/documenting his library surprisingly seriously. – Chris Sep 21 '13 at 21:23
I know this is an old question but thought I would post my response in case anyone else comes across it.
I wrote a Stream based implementation of uuencoding for both the encoder and decoder with extensive unit tests.
To decode any stream:
using (Stream encodedStream = /* Any readable stream. */)
using (Stream decodedStream = /* Any writeable stream. */)
using (var decodeStream = new UUDecodeStream(encodedStream))
{
decodeStream.CopyTo(decodedStream);
// Decoded contents are now in decodedStream.
}
To encode any stream:
bool unixLineEnding = // True if encoding with Unix line endings, otherwise false.
using (Stream encodedStream = /* Any readable stream. */)
using (Stream decodedStream = /* Any writeable stream. */)
using (var encodeStream = new UUEncodeStream(encodedStream, unixLineEnding))
{
decodedStream.CopyTo(encodeStream);
// Encoded contents are now in encodedStream.
}

- 69
- 4
-
-
and it is always throwing Index out of range exception in my case where line length is 61 chars – Neel Jun 02 '16 at 06:41