Safe Haskell | None |
---|---|
Language | Haskell2010 |
Support for CRC
Synopsis
- newtype CRC = CRC { }
- computeCRC :: forall a. CRC32 a => a -> CRC
- initCRC :: CRC
- updateCRC :: forall a. CRC32 a => a -> CRC -> CRC
- hGetAllAtCRC :: forall m h. Monad m => HasFS m h -> Handle h -> AbsOffset -> m ( ByteString , CRC )
- hGetExactlyAtCRC :: forall m h. ( HasCallStack , MonadThrow m) => HasFS m h -> Handle h -> Word64 -> AbsOffset -> m ( ByteString , CRC )
- hPutAllCRC :: forall m h. ( HasCallStack , Monad m) => HasFS m h -> Handle h -> ByteString -> m ( Word64 , CRC )
Wrap digest functionality
Instances
Eq CRC Source # | |
Show CRC Source # | |
Generic CRC Source # | |
Storable CRC Source # | |
Defined in Ouroboros.Consensus.Storage.FS.CRC |
|
NoThunks CRC Source # | |
type Rep CRC Source # | |
Defined in Ouroboros.Consensus.Storage.FS.CRC |
computeCRC :: forall a. CRC32 a => a -> CRC Source #
File system functions with CRC functionality
:: forall m h. Monad m | |
=> HasFS m h | |
-> Handle h | |
-> AbsOffset |
The offset at which to read. |
-> m ( ByteString , CRC ) |
Variation on
hGetAllAt
that also computes a CRC
:: forall m h. ( HasCallStack , MonadThrow m) | |
=> HasFS m h | |
-> Handle h | |
-> Word64 |
The number of bytes to read. |
-> AbsOffset |
The offset at which to read. |
-> m ( ByteString , CRC ) |
Variation on
hGetExactlyAt
that also computes a CRC
hPutAllCRC :: forall m h. ( HasCallStack , Monad m) => HasFS m h -> Handle h -> ByteString -> m ( Word64 , CRC ) Source #
Variation on
hPutAll
that also computes a CRC