fixed :: Int -> (Ptr Word8 -> IO ()) -> Encode
fixed len f = Encode len . Poke $ \state offset -> do
    f $ pokeStatePtr state `plusPtr` offset
    let !newOffset = offset + len
    return (newOffset, ())


fixed :: Int -> (Ptr Word8 -> IO ()) -> Encode
fixed len f = Encode len . Poke $ \state offset -> do
    f $ pokeStatePtr state `plusPtr` offset
    let !newOffset = offset + len
    return (newOffset, ())


fixed len f = Encode len . Poke $ \state offset -> do
    f $ pokeStatePtr state `plusPtr` offset
    let !newOffset = offset + len
    return (newOffset, ())

