telescope-0.2.0: Astronomical Observations (FITS, ASDF, WCS, etc)
Safe HaskellNone
LanguageGHC2021

Telescope.Asdf.Encoding.File

Synopsis

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 #

newtype Encoded (a :: k) Source #

values that have been encoded to the file format: padding, etc

Constructors

Encoded 

Fields

Instances

Instances details
IsString (Encoded a) Source # 
Instance details

Defined in Telescope.Asdf.Encoding.File

Methods

fromString :: String -> Encoded a #

Show (Encoded a) Source # 
Instance details

Defined in Telescope.Asdf.Encoding.File

Methods

showsPrec :: Int -> Encoded a -> ShowS #

show :: Encoded a -> String #

showList :: [Encoded a] -> ShowS #

Eq (Encoded a) Source # 
Instance details

Defined in Telescope.Asdf.Encoding.File

Methods

(==) :: Encoded a -> Encoded a -> Bool #

(/=) :: Encoded a -> Encoded a -> Bool #

newtype BlockData Source #

Decompressed block data

Constructors

BlockData 

Fields

Instances

Instances details
Show BlockData Source # 
Instance details

Defined in Telescope.Asdf.Encoding.File

Eq BlockData Source # 
Instance details

Defined in Telescope.Asdf.Encoding.File

newtype BlockIndex Source #

Constructors

BlockIndex [Int] 

Instances

Instances details
Eq BlockIndex Source # 
Instance details

Defined in Telescope.Asdf.Encoding.File

data Compression Source #

Constructors

NoCompression 
ZLib 
BZip2 

Instances

Instances details
Show Compression Source # 
Instance details

Defined in Telescope.Asdf.Encoding.File

Eq Compression Source # 
Instance details

Defined in Telescope.Asdf.Encoding.File

newtype Checksum Source #

Constructors

Checksum ByteString 

Instances

Instances details
Show Checksum Source # 
Instance details

Defined in Telescope.Asdf.Encoding.File

Eq Checksum Source # 
Instance details

Defined in Telescope.Asdf.Encoding.File

data AsdfFile Source #

Constructors

AsdfFile 

Instances

Instances details
Show AsdfFile Source # 
Instance details

Defined in Telescope.Asdf.Encoding.File

Eq AsdfFile Source # 
Instance details

Defined in Telescope.Asdf.Encoding.File

getBlocks :: Get [BlockData] Source #

Skip along blocks and create a list of all of them

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