Uuencode / Uudecode for .NET or Visual C ++ 6.0?
Code Project has .NET library + source code for uuencoding / decoding. The algorithm itself is widespread across the network and is quite short.
Project code link: http://www.codeproject.com/KB/security/TextCoDec.aspx
Brief introduction from the article:
This article introduces a class library for encoding / decoding files and / or text in multiple algorithms in .NET. Some functions of this library:
Encoding / decoding quoted text Files for encoding / decoding for printing and text in Base64 Encoding / decoding files and text in encoding / decoding UUEncode files in yEnc
a source to share
I know this is an old question, but I thought I'd post my answer in case anyone else comes across it.
I wrote a streaming uuencoding injection for an 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.
}
a source to share