hashed-storage 0.5.8 → 0.5.9
raw patch · 2 files changed
+15/−14 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Storage/Hashed/Utils.hs +14/−13
- hashed-storage.cabal +1/−1
Storage/Hashed/Utils.hs view
@@ -23,7 +23,7 @@ import System.IO (withFile, IOMode(ReadMode), hSeek, SeekMode(AbsoluteSeek)) import Data.Bits( Bits ) #ifdef BIGENDIAN-import Data.Bits( (.&.), (.|.), shift, shiftL, shiftR )+import Data.Bits( (.&.), (.|.), shift, shiftL, rotateR ) #endif import qualified Data.ByteString.Lazy.Char8 as BL@@ -104,18 +104,19 @@ bytemask :: (Bits a) => a bytemask = 255 -xlate32 a = ((a .&. (bytemask `shift` 0) `shiftL` 24)) .|.- ((a .&. (bytemask `shift` 8) `shiftL` 8)) .|.- ((a .&. (bytemask `shift` 16) `shiftR` 8)) .|.- ((a .&. (bytemask `shift` 24) `shiftR` 24))-xlate64 a = ((a .&. (bytemask `shift` 0) `shiftL` 56)) .|.- ((a .&. (bytemask `shift` 8) `shiftL` 40)) .|.- ((a .&. (bytemask `shift` 16) `shiftL` 24)) .|.- ((a .&. (bytemask `shift` 24) `shiftL` 8)) .|.- ((a .&. (bytemask `shift` 32) `shiftR` 8)) .|.- ((a .&. (bytemask `shift` 40) `shiftR` 24)) .|.- ((a .&. (bytemask `shift` 48) `shiftR` 40)) .|.- ((a .&. (bytemask `shift` 56) `shiftR` 56))+xlate32 a = ((a .&. (bytemask `shift` 0)) `shiftL` 24) .|.+ ((a .&. (bytemask `shift` 8)) `shiftL` 8) .|.+ ((a .&. (bytemask `shift` 16)) `rotateR` 8) .|.+ ((a .&. (bytemask `shift` 24)) `rotateR` 24)++xlate64 a = ((a .&. (bytemask `shift` 0)) `shiftL` 56) .|.+ ((a .&. (bytemask `shift` 8)) `shiftL` 40) .|.+ ((a .&. (bytemask `shift` 16)) `shiftL` 24) .|.+ ((a .&. (bytemask `shift` 24)) `shiftL` 8) .|.+ ((a .&. (bytemask `shift` 32)) `rotateR` 8) .|.+ ((a .&. (bytemask `shift` 40)) `rotateR` 24) .|.+ ((a .&. (bytemask `shift` 48)) `rotateR` 40) .|.+ ((a .&. (bytemask `shift` 56)) `rotateR` 56) #endif -- | Find a monadic fixed point of @f@ that is the least above @i@. (Will
hashed-storage.cabal view
@@ -1,5 +1,5 @@ name: hashed-storage-version: 0.5.8+version: 0.5.9 synopsis: Hashed file storage support code. description: Support code for reading and manipulating hashed file storage