HaskellWorks.Data.ByteString

hw-prim-0.6.3.2: Primitive functions and data types

Safe Haskell | None
Language | Haskell2010

HaskellWorks.Data.ByteString

Synopsis

- chunkedBy :: Int -> ByteString -> [ByteString]
- class ToByteString a where
  - toByteString :: a -> ByteString
- class ToByteStrings a where
  - toByteStrings :: a -> [ByteString]
- mmap :: FilePath -> IO ByteString
- padded :: Int -> ByteString -> ByteString
- rechunk :: Int -> [ByteString] -> [ByteString]
- rechunkPadded :: Int -> [ByteString] -> [ByteString]
- resegment :: Int -> [ByteString] -> [ByteString]
- resegmentPadded :: Int -> [ByteString] -> [ByteString]
- hGetContentsChunkedBy :: Int -> Handle -> IO [ByteString]

# Documentation

chunkedBy :: Int -> ByteString -> [ByteString] #

Chunk a `bs into list of smaller byte strings of no more than` n elements

class ToByteString a where #

Methods

toByteString :: a -> ByteString #

#### Instances

Instances details

ToByteString ByteString # |
Instance details Defined in HaskellWorks.Data.ByteString Methods toByteString :: ByteString -> ByteString #
ToByteString (Vector Word16) # |
Instance details Defined in HaskellWorks.Data.ByteString Methods toByteString :: Vector Word16 -> ByteString #
ToByteString (Vector Word32) # |
Instance details Defined in HaskellWorks.Data.ByteString Methods toByteString :: Vector Word32 -> ByteString #
ToByteString (Vector Word64) # |
Instance details Defined in HaskellWorks.Data.ByteString Methods toByteString :: Vector Word64 -> ByteString #
ToByteString (Vector Word8) # |
Instance details Defined in HaskellWorks.Data.ByteString Methods toByteString :: Vector Word8 -> ByteString #
ToByteString [Word64] # |
Instance details Defined in HaskellWorks.Data.ByteString Methods toByteString :: [Word64] -> ByteString #

class ToByteStrings a where #

Methods

toByteStrings :: a -> [ByteString] #

#### Instances

Instances details

ToByteStrings ByteString # |
Instance details Defined in HaskellWorks.Data.ByteString Methods toByteStrings :: ByteString -> [ByteString] #
ToByteStrings ByteString # |
Instance details Defined in HaskellWorks.Data.ByteString Methods toByteStrings :: ByteString -> [ByteString] #
ToByteStrings (Vector Word16) # |
Instance details Defined in HaskellWorks.Data.ByteString Methods toByteStrings :: Vector Word16 -> [ByteString] #
ToByteStrings (Vector Word32) # |
Instance details Defined in HaskellWorks.Data.ByteString Methods toByteStrings :: Vector Word32 -> [ByteString] #
ToByteStrings (Vector Word64) # |
Instance details Defined in HaskellWorks.Data.ByteString Methods toByteStrings :: Vector Word64 -> [ByteString] #
ToByteStrings (Vector Word8) # |
Instance details Defined in HaskellWorks.Data.ByteString Methods toByteStrings :: Vector Word8 -> [ByteString] #
ToByteStrings [ByteString] # |
Instance details Defined in HaskellWorks.Data.ByteString Methods toByteStrings :: [ByteString] -> [ByteString] #
ToByteStrings [Word64] # |
Instance details Defined in HaskellWorks.Data.ByteString Methods toByteStrings :: [Word64] -> [ByteString] #
ToByteStrings [Vector Word16] # |
Instance details Defined in HaskellWorks.Data.ByteString Methods toByteStrings :: [Vector Word16] -> [ByteString] #
ToByteStrings [Vector Word32] # |
Instance details Defined in HaskellWorks.Data.ByteString Methods toByteStrings :: [Vector Word32] -> [ByteString] #
ToByteStrings [Vector Word64] # |
Instance details Defined in HaskellWorks.Data.ByteString Methods toByteStrings :: [Vector Word64] -> [ByteString] #
ToByteStrings [Vector Word8] # |
Instance details Defined in HaskellWorks.Data.ByteString Methods toByteStrings :: [Vector Word8] -> [ByteString] #

mmap :: FilePath -> IO ByteString #

padded :: Int -> ByteString -> ByteString #

rechunk :: Int -> [ByteString] -> [ByteString] #

rechunkPadded :: Int -> [ByteString] -> [ByteString] #

resegment :: Int -> [ByteString] -> [ByteString] #

resegmentPadded :: Int -> [ByteString] -> [ByteString] #

hGetContentsChunkedBy :: Int -> Handle -> IO [ByteString] #