Safe Haskell | None |
---|---|
Language | GHC2021 |
Synopsis
- splitAsdfFile :: forall (es :: [Effect]). Error AsdfError :> es => ByteString -> Eff es AsdfFile
- parseAsdfFile :: forall (es :: [Effect]). (State ByteString :> es, Fail :> es) => Eff es AsdfFile
- parseTree :: forall (es :: [Effect]). (State ByteString :> es, NonDet :> es) => Eff es (Encoded Tree)
- parseIndex :: forall (es :: [Effect]). State ByteString :> es => Eff es (Encoded Index)
- parseBlocks :: forall (es :: [Effect]). (State ByteString :> es, NonDet :> es) => Eff es [Encoded Block]
- parseBlock :: forall (es :: [Effect]). (State ByteString :> es, NonDet :> es) => Eff es (Encoded Block)
- exactly :: forall (es :: [Effect]). (State ByteString :> es, NonDet :> es) => ByteString -> Eff es ()
- parseUntil :: forall (es :: [Effect]). (State ByteString :> es, NonDet :> es) => ByteString -> Eff es ByteString
- nonEmpty :: forall (es :: [Effect]). (NonDet :> es, State ByteString :> es) => Eff es ByteString
- remainingBytes :: forall (es :: [Effect]). (NonDet :> es, State ByteString :> es) => Eff es ByteString
- breakIndex :: forall (es :: [Effect]). State ByteString :> es => Eff es (Encoded Index)
- concatAsdfFile :: AsdfFile -> ByteString
- encodeTree :: ByteString -> Encoded Tree
- encodeBlocks :: [BlockData] -> [Encoded Block]
- encodeBlock :: BlockData -> Encoded Block
- encodeIndex :: BlockIndex -> Encoded Index
- data Index
- data Block
- newtype Encoded (a :: k) = Encoded {
- bytes :: ByteString
- newtype BlockData = BlockData {
- bytes :: ByteString
- newtype BlockSource = BlockSource Int
- data BlockHeader = BlockHeader {
- headerSize :: Word16
- flags :: Word32
- compression :: Compression
- allocatedSize :: Word64
- usedSize :: Word64
- dataSize :: Word64
- checksum :: Checksum
- newtype BlockIndex = BlockIndex [Int]
- data Compression
- = NoCompression
- | ZLib
- | BZip2
- newtype Checksum = Checksum ByteString
- noChecksum :: Checksum
- data AsdfFile = AsdfFile {}
- getBlock :: Get BlockData
- getBlocks :: Get [BlockData]
- getBlockHeader :: Get BlockHeader
- putBlockHeader :: BlockHeader -> Put
- blockIndex :: Encoded Tree -> [Encoded Block] -> BlockIndex
- putBlock :: BlockData -> Put
- blockHeader :: BlockData -> BlockHeader
- getBlockData :: BlockHeader -> Get BlockData
- blockMagicToken :: ByteString
- blockIndexHeader :: ByteString
- checkMagicToken :: Get Bool
- getMagicToken :: Get (Either ByteString ())
Documentation
splitAsdfFile :: forall (es :: [Effect]). Error AsdfError :> es => ByteString -> Eff es AsdfFile Source #
Split an encoded ByteString
into a Tree
, '[Encoded Block]' and 'Encoded Index'
parseAsdfFile :: forall (es :: [Effect]). (State ByteString :> es, Fail :> es) => Eff es AsdfFile Source #
Lightweight first-pass parsing using 'State ByteString' instead of Parsec or similar
parseTree :: forall (es :: [Effect]). (State ByteString :> es, NonDet :> es) => Eff es (Encoded Tree) Source #
parseIndex :: forall (es :: [Effect]). State ByteString :> es => Eff es (Encoded Index) Source #
parseBlocks :: forall (es :: [Effect]). (State ByteString :> es, NonDet :> es) => Eff es [Encoded Block] Source #
parseBlock :: forall (es :: [Effect]). (State ByteString :> es, NonDet :> es) => Eff es (Encoded Block) Source #
exactly :: forall (es :: [Effect]). (State ByteString :> es, NonDet :> es) => ByteString -> Eff es () Source #
parseUntil :: forall (es :: [Effect]). (State ByteString :> es, NonDet :> es) => ByteString -> Eff es ByteString Source #
nonEmpty :: forall (es :: [Effect]). (NonDet :> es, State ByteString :> es) => Eff es ByteString Source #
remainingBytes :: forall (es :: [Effect]). (NonDet :> es, State ByteString :> es) => Eff es ByteString Source #
breakIndex :: forall (es :: [Effect]). State ByteString :> es => Eff es (Encoded Index) Source #
concatAsdfFile :: AsdfFile -> ByteString Source #
encodeTree :: ByteString -> Encoded Tree Source #
encodeIndex :: BlockIndex -> Encoded Index Source #
newtype Encoded (a :: k) Source #
values that have been encoded to the file format: padding, etc
newtype BlockSource Source #
Instances
Eq BlockSource Source # | |
Defined in Telescope.Asdf.Encoding.File (==) :: BlockSource -> BlockSource -> Bool # (/=) :: BlockSource -> BlockSource -> Bool # | |
ToAsdf BlockSource Source # | |
Defined in Telescope.Asdf.Class |
data BlockHeader Source #
BlockHeader | |
|
Instances
Show BlockHeader Source # | |
Defined in Telescope.Asdf.Encoding.File showsPrec :: Int -> BlockHeader -> ShowS # show :: BlockHeader -> String # showList :: [BlockHeader] -> ShowS # | |
Eq BlockHeader Source # | |
Defined in Telescope.Asdf.Encoding.File (==) :: BlockHeader -> BlockHeader -> Bool # (/=) :: BlockHeader -> BlockHeader -> Bool # |
newtype BlockIndex Source #
Instances
Eq BlockIndex Source # | |
Defined in Telescope.Asdf.Encoding.File (==) :: BlockIndex -> BlockIndex -> Bool # (/=) :: BlockIndex -> BlockIndex -> Bool # |
data Compression Source #
Instances
Show Compression Source # | |
Defined in Telescope.Asdf.Encoding.File showsPrec :: Int -> Compression -> ShowS # show :: Compression -> String # showList :: [Compression] -> ShowS # | |
Eq Compression Source # | |
Defined in Telescope.Asdf.Encoding.File (==) :: Compression -> Compression -> Bool # (/=) :: Compression -> Compression -> Bool # |
putBlockHeader :: BlockHeader -> Put Source #
blockIndex :: Encoded Tree -> [Encoded Block] -> BlockIndex Source #
blockHeader :: BlockData -> BlockHeader Source #
getBlockData :: BlockHeader -> Get BlockData Source #
checkMagicToken :: Get Bool Source #
Verify that the magic token is next without consuming any input
getMagicToken :: Get (Either ByteString ()) Source #
consume the magic token if available