base64-bytestring 0.1.0.1 → 0.1.0.2
raw patch · 3 files changed
+43/−2 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Data/ByteString/Base64.hs +4/−1
- README.markdown +37/−0
- base64-bytestring.cabal +2/−1
Data/ByteString/Base64.hs view
@@ -42,7 +42,10 @@ -- | Encode a string into base64 form. The result will always be a -- multiple of 4 bytes in length. encode :: ByteString -> ByteString-encode (PS sfp soff slen) = unsafePerformIO $ do+encode (PS sfp soff slen)+ | slen > maxBound `div` 4 =+ error "Data.ByteString.Base64.encode: input too long"+ | otherwise = unsafePerformIO $ do let dlen = ((slen + 2) `div` 3) * 4 dfp <- mallocByteString dlen withForeignPtr alfaFP $ \aptr ->
+ README.markdown view
@@ -0,0 +1,37 @@+# Fast base64 support++This package provides a Haskell library for working with base64-encoded+data quickly and efficiently, using the ByteString type.+++# Performance++This library is written in pure Haskell, and it's fast:++* 250 MB/sec encoding++* 200 MB/sec strict decoding (per RFC 4648)++* 100 MB/sec lenient decoding+++# Get involved!++Please report bugs via the+[bitbucket issue tracker](http://bitbucket.org/bos/base64-bytestring).++Master [Mercurial repository](http://bitbucket.org/bos/base64-bytestring):++* `hg clone http://bitbucket.org/bos/base64-bytestring`++There's also a [git mirror](http://github.com/bos/base64-bytestring):++* `git clone git://github.com/bos/base64-bytestring.git`++(You can create and contribute changes using either Mercurial or git.)+++# Authors++This library is written and maintained by Bryan O'Sullivan,+<bos@serpentine.com>.
base64-bytestring.cabal view
@@ -1,5 +1,5 @@ name: base64-bytestring-version: 0.1.0.1+version: 0.1.0.2 synopsis: Fast base64 encoding and deconding for ByteStrings description: Fast base64 encoding and deconding for ByteStrings homepage: http://bitbucket.org/bos/base64-bytestring@@ -11,6 +11,7 @@ copyright: 2010 Bryan O'Sullivan category: Data build-type: Simple+extra-source-files: README.markdown extra-source-files: tests/Transcode.hs