摘要:
The class System.Convert provide two basic methods "ToBase64String()" and "Convert.FromBase64String()" to encode a byte array to a base64 string and decode a base64 string to a byte array.
It is very good to use them to encode and decode base64. But in some case, it is a disaster.
For example, if you want to encode a 4 gb file to base64, the code above must throw an OutOfMemory exception., because you must read the file into a byte array. So we need to look for another way to e 阅读全文
posted @ 2008-04-20 21:48
江大渔
阅读(2314)
评论(1)
推荐(0)