-- GENERATED by C->Haskell Compiler, version 0.28.3 Switcheroo, 25 November 2017 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 "src/Codec/Archive/Foreign/Archive.chs" #-}
-- | This module corresponds to @archive.h@
--
-- Functions in this module are stateful and hence take place in the 'IO'
-- monad.
module Codec.Archive.Foreign.Archive ( archiveReadHasEncryptedEntries
                                     -- * Version information
                                     , archiveVersionNumber
                                     , archiveVersionString
                                     , archiveVersionDetails
                                     , archiveZlibVersion
                                     , archiveLiblzmaVersion
                                     , archiveBzlibVersion
                                     , archiveLiblz4Version
                                     , archiveLibzstdVersion
                                     -- * Miscellany
                                     , archiveErrorString
                                     , archiveFormatName
                                     , archiveFormat
                                     , archiveClearError
                                     , archiveSetError
                                     , archiveCopyError
                                     , archiveFileCount
                                     , archiveFilterCount
                                     , archiveFilterBytes
                                     , archiveFilterCode
                                     , archiveFilterName
                                     -- * Read
                                     , archiveReadData
                                     , archiveReadNew
                                     , archiveReadSetOpenCallback
                                     , archiveReadSetSeekCallback
                                     , archiveReadSetSkipCallback
                                     , archiveReadSetSwitchCallback
                                     , archiveReadSetCallbackData2
                                     , archiveReadAddCallbackData
                                     , archiveReadAppendCallbackData
                                     , archiveReadPrependCallbackData
                                     , archiveReadSetReadCallback
                                     , archiveReadSetCloseCallback
                                     , archiveReadSetCallbackData
                                     , archiveReadSetFormat
                                     , archiveReadOpen
                                     , archiveReadOpenFilename
                                     , archiveReadOpenFilenameW
                                     , archiveReadOpenFilenames
                                     , archiveReadOpenMemory
                                     , archiveReadOpen1
                                     , archiveReadOpen2
                                     , archiveReadOpenFd
                                     , archiveReadOpenFILE
                                     , archiveReadNextHeader
                                     , archiveReadNextHeader2
                                     , archiveReadHeaderPosition
                                     , archiveReadFormatCapabilities
                                     , archiveSeekData
                                     , archiveReadDataBlock
                                     , archiveReadDataIntoFd
                                     , archiveReadSetFormatOption
                                     , archiveReadSetFilterOption
                                     , archiveReadSetOption
                                     , archiveReadSetOptions
                                     , archiveReadAddPassphrase
                                     , archiveReadSetPassphraseCallback
                                     , archiveReadExtract
                                     , archiveReadExtract2
                                     , archiveReadExtractSetProgressCallback
                                     , archiveReadExtractSetSkipFile
                                     , archiveReadClose
                                     , archiveReadFree
                                     , archiveReadSupportFilterAll
                                     , archiveReadSupportFilterByCode
                                     , archiveReadSupportFilterBzip2
                                     , archiveReadSupportFilterCompress
                                     , archiveReadSupportFilterGzip
                                     , archiveReadSupportFilterGrzip
                                     , archiveReadSupportFilterLrzip
                                     , archiveReadSupportFilterLz4
                                     , archiveReadSupportFilterLzip
                                     , archiveReadSupportFilterLzma
                                     , archiveReadSupportFilterLzop
                                     , archiveReadSupportFilterNone
                                     , archiveReadSupportFilterProgram
                                     , archiveReadSupportFilterProgramSignature
                                     , archiveReadSupportFilterRpm
                                     , archiveReadSupportFilterUu
                                     , archiveReadSupportFilterXz
                                     , archiveReadSupportFormatAll
                                     , archiveReadSupportFormat7zip
                                     , archiveReadSupportFormatAr
                                     , archiveReadSupportFormatByCode
                                     , archiveReadSupportFormatCab
                                     , archiveReadSupportFormatCpio
                                     , archiveReadSupportFormatEmpty
                                     , archiveReadSupportFormatGnutar
                                     , archiveReadSupportFormatIso9660
                                     , archiveReadSupportFormatLha
                                     , archiveReadSupportFormatMtree
                                     , archiveReadSupportFormatRar
                                     , archiveReadSupportFormatRar5
                                     , archiveReadSupportFormatRaw
                                     , archiveReadSupportFormatTar
                                     , archiveReadSupportFormatWarc
                                     , archiveReadSupportFormatXar
                                     , archiveReadSupportFormatZip
                                     , archiveReadSupportFormatZipStreamable
                                     , archiveReadSupportFormatZipSeekable
                                     , archiveReadAppendFilter
                                     , archiveReadAppendFilterProgram
                                     , archiveReadAppendFilterProgramSignature
                                     -- * Write
                                     , archiveWriteOpenMemory
                                     , archiveWriteNew
                                     , archiveWriteData
                                     , archiveWriteOpen
                                     , archiveWriteClose
                                     , archiveWriteHeader
                                     , archiveWriteSetBytesPerBlock
                                     , archiveWriteGetBytesPerBlock
                                     , archiveWriteSetBytesInLastBlock
                                     , archiveWriteGetBytesInLastBlock
                                     , archiveWriteSetSkipFile
                                     , archiveWriteAddFilter
                                     , archiveWriteAddFilterByName
                                     , archiveWriteAddFilterB64encode
                                     , archiveWriteAddFilterBzip2
                                     , archiveWriteAddFilterCompress
                                     , archiveWriteAddFilterGrzip
                                     , archiveWriteAddFilterLrzip
                                     , archiveWriteAddFilterLz4
                                     , archiveWriteAddFilterLzma
                                     , archiveWriteAddFilterLzip
                                     , archiveWriteAddFilterLzop
                                     , archiveWriteAddFilterNone
                                     , archiveWriteAddFilterProgram
                                     , archiveWriteAddFilterUuencode
                                     , archiveWriteAddFilterXz
                                     , archiveWriteAddFilterZstd
                                     , archiveWriteSetFormat
                                     , archiveWriteSetFormatByName
                                     , archiveWriteSetFormatArBsd
                                     , archiveWriteSetFormatArSvr4
                                     , archiveWriteSetFormatCpio
                                     , archiveWriteSetFormatCpioNewc
                                     , archiveWriteSetFormatGnutar
                                     , archiveWriteSetFormatMtree
                                     , archiveWriteSetFormatMtreeClassic
                                     , archiveWriteSetFormatPax
                                     , archiveWriteSetFormatPaxRestricted
                                     , archiveWriteSetFormatZip
                                     , archiveWriteSetFormat7zip
                                     , archiveWriteSetFormatRaw
                                     , archiveWriteSetFormatShar
                                     , archiveWriteSetFormatSharDump
                                     , archiveWriteSetFormatUstar
                                     , archiveWriteSetFormatV7tar
                                     , archiveWriteSetFormatWarc
                                     , archiveWriteSetFormatXar
                                     , archiveWriteSetFormatFilterByExt
                                     , archiveWriteSetFormatFilterByExtDef
                                     , archiveWriteZipSetCompressionDeflate
                                     , archiveWriteZipSetCompressionStore
                                     , archiveWriteOpen2
                                     , archiveWriteOpenFd
                                     , archiveWriteOpenFilenameW
                                     , archiveWriteOpenFilename
                                     , archiveWriteOpenFILE
                                     , archiveWriteDataBlock
                                     , archiveWriteFinishEntry
                                     , archiveWriteFail
                                     , archiveWriteFree
                                     , archiveWriteSetFormatOption
                                     , archiveWriteSetFilterOption
                                     , archiveWriteSetOption
                                     , archiveWriteSetOptions
                                     , archiveWriteSetPassphrase
                                     , archiveWriteSetPassphraseCallback
                                     -- * Write disk
                                     , archiveWriteDiskSetOptions
                                     , archiveWriteDiskNew
                                     , archiveWriteDiskSetSkipFile
                                     , archiveWriteDiskSetStandardLookup
                                     , archiveWriteDiskSetGroupLookup
                                     , archiveWriteDiskSetUserLookup
                                     , archiveWriteDiskGid
                                     , archiveWriteDiskUid
                                     -- * Read disk
                                     , archiveReadDiskNew
                                     , archiveReadDiskSetSymlinkLogical
                                     , archiveReadDiskSetSymlinkPhysical
                                     , archiveReadDiskSetSymlinkHybrid
                                     , archiveReadDiskEntryFromFile
                                     , archiveReadDiskGname
                                     , archiveReadDiskUname
                                     , archiveReadDiskSetStandardLookup
                                     , archiveReadDiskSetGnameLookup
                                     , archiveReadDiskSetUnameLookup
                                     , archiveReadDiskOpen
                                     , archiveReadDiskOpenW
                                     , archiveReadDiskDescend
                                     , archiveReadDiskCanDescend
                                     , archiveReadDiskCurrentFilesystem
                                     , archiveReadDiskCurrentFilesystemIsSynthetic
                                     , archiveReadDiskCurrentFilesystemIsRemote
                                     , archiveReadDiskSetAtimeRestored
                                     , archiveReadDiskSetBehavior
                                     , archiveReadDiskSetMatching
                                     , archiveReadDiskSetMetadataFilterCallback
                                     , archiveReadDiskNoAcl
                                     , archiveReadDiskNoFFlags
                                     -- * Version macros
                                     , archiveVersionNumberMacro
                                     , archiveVersionOnlyString
                                     , archiveVersionStringMacro
                                     -- * Capability macros
                                     , archiveReadFormatCapsNone
                                     , archiveReadFormatCapsEncryptData
                                     , archiveReadFormatCapsEncryptMetadata
                                     -- * Time matching macros
                                     , archiveMatchMTime
                                     , archiveMatchCTime
                                     , archiveMatchNewer
                                     , archiveMatchOlder
                                     , archiveMatchEqual
                                     -- * Entry flags
                                     , archiveExtractOwner
                                     , archiveExtractPerm
                                     , archiveExtractTime
                                     , archiveExtractNoOverwrite
                                     , archiveExtractUnlink
                                     , archiveExtractACL
                                     , archiveExtractFFlags
                                     , archiveExtractXattr
                                     , archiveExtractSecureSymlinks
                                     , archiveExtractSecureNoDotDot
                                     , archiveExtractNoAutodir
                                     , archiveExtractSparse
                                     , archiveExtractMacMetadata
                                     , archiveExtractNoHfsCompression
                                     , archiveExtractHfsCompressionForced
                                     , archiveExtractSecureNoAbsolutePaths
                                     , archiveExtractClearNoChangeFFlags
                                     , archiveExtractNoOverwriteNewer
                                     -- * Read disk flags
                                     , archiveReadDiskRestoreATime
                                     , archiveReadDiskHonorNoDump
                                     , archiveReadDiskMacCopyFile
                                     , archiveReadDiskNoTraverseMounts
                                     , archiveReadDiskNoXattr
                                     , archiveFree
                                     , archiveEntryFree
                                     , archiveMatchExcluded
                                     , archiveMatchPathExcluded
                                     , archiveMatchSetInclusionRecursion
                                     , archiveMatchExcludePattern
                                     , archiveMatchExcludePatternW
                                     , archiveMatchIncludePattern
                                     , archiveMatchIncludePatternW
                                     , archiveMatchExcludePatternFromFile
                                     , archiveMatchExcludePatternFromFileW
                                     , archiveMatchIncludePatternFromFile
                                     , archiveMatchIncludePatternFromFileW
                                     , archiveMatchPathUnmatchedInclusions
                                     , archiveMatchPathUnmatchedInclusionsNext
                                     , archiveMatchPathUnmatchedInclusionsNextW
                                     , archiveMatchIncludeTime
                                     , archiveMatchIncludeDate
                                     , archiveMatchIncludeDateW
                                     , archiveMatchIncludeFileTime
                                     , archiveMatchIncludeFileTimeW
                                     , archiveMatchTimeExcluded
                                     , archiveMatchOwnerExcluded
                                     , archiveMatchExcludeEntry
                                     , archiveReadDataSkip
                                     , archiveMatchIncludeGname
                                     , archiveMatchIncludeGnameW
                                     , archiveMatchIncludeUname
                                     , archiveMatchIncludeUnameW
                                     , archiveMatchIncludeUid
                                     , archiveMatchIncludeGid
                                     , archiveErrno
                                     -- * Abstract types
                                     , Archive
                                     -- * Haskell types
                                     , ArchiveEncryption (..)
                                     -- * C types
                                     , FilePtr (..)
                                     -- * Enum types
                                     , ArchiveFilter (..)
                                     , ArchiveFormat (..)
                                     -- * Lower-level API types
                                     , Flags
                                     , ArchiveCapabilities
                                     , ReadDiskFlags
                                     , TimeFlag
                                     -- * Callback types
                                     , ArchiveReadCallback
                                     , ArchiveSkipCallback
                                     , ArchiveSeekCallback
                                     , ArchiveWriteCallback
                                     , ArchiveOpenCallback
                                     , ArchiveCloseCallback
                                     , ArchiveSwitchCallback
                                     , ArchiveOpenCallbackRaw
                                     , ArchiveCloseCallbackRaw
                                     , ArchiveSwitchCallbackRaw
                                     , ArchivePassphraseCallback
                                     , ArchiveFreeCallback
                                     -- * Callback constructors
                                     , noOpenCallback
                                     , mkReadCallback
                                     , mkSkipCallback
                                     , mkSeekCallback
                                     , mkWriteCallback
                                     , mkPassphraseCallback
                                     , mkOpenCallback
                                     , mkCloseCallback
                                     , mkSwitchCallback
                                     , mkFreeCallback
                                     , mkWriteLookup
                                     , mkReadLookup
                                     , mkCleanup
                                     , mkMatch
                                     , mkFilter
                                     , mkExcludedCallback
                                     -- * Type synonyms
                                     , ArchiveEntryPtr
                                     , ArchivePtr
                                     , StatPtr
                                     -- * libarchive types
                                     , LaInt64
                                     , LaSSize
                                     ) where
import qualified Foreign.C.String as C2HSImp
import qualified Foreign.C.Types as C2HSImp
import qualified Foreign.ForeignPtr as C2HSImp
import qualified Foreign.Marshal.Utils as C2HSImp
import qualified Foreign.Ptr as C2HSImp
import qualified System.IO.Unsafe as C2HSImp



import qualified Codec.Archive.Types.Foreign
{-# LINE 334 "src/Codec/Archive/Foreign/Archive.chs" #-}


import Codec.Archive.Foreign.Archive.Macros
import Codec.Archive.Types
import Control.Composition ((.*), (.**))
import Data.Coerce (coerce)
import Foreign.C.String
import Foreign.C.Types
import Foreign.Marshal.Alloc (alloca)
import Foreign.Ptr
import Foreign.Storable (Storable (peek))
import System.Posix.Types (Fd (..))

-- callbacks
foreign import ccall "wrapper" mkReadCallback :: ArchiveReadCallback a b -> IO (FunPtr (ArchiveReadCallback a b))
foreign import ccall "wrapper" mkSkipCallback :: ArchiveSkipCallback a -> IO (FunPtr (ArchiveSkipCallback a))
foreign import ccall "wrapper" mkSeekCallback :: ArchiveSeekCallback a -> IO (FunPtr (ArchiveSeekCallback a))
foreign import ccall "wrapper" mkWriteCallback :: ArchiveWriteCallback a b -> IO (FunPtr (ArchiveWriteCallback a b))
foreign import ccall "wrapper" mkOpenCallbackRaw :: ArchiveOpenCallbackRaw a -> IO (FunPtr (ArchiveOpenCallbackRaw a))
foreign import ccall "wrapper" mkCloseCallbackRaw :: ArchiveCloseCallbackRaw a -> IO (FunPtr (ArchiveCloseCallbackRaw a))
foreign import ccall "wrapper" mkSwitchCallbackRaw :: ArchiveSwitchCallbackRaw a b -> IO (FunPtr (ArchiveSwitchCallbackRaw a b))
foreign import ccall "wrapper" mkPassphraseCallback :: ArchivePassphraseCallback a -> IO (FunPtr (ArchivePassphraseCallback a))
foreign import ccall "wrapper" mkExcludedCallback :: (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO ()) -> IO (FunPtr (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO ()))
foreign import ccall "wrapper" mkFreeCallbackRaw :: ArchiveFreeCallbackRaw a -> IO (FunPtr (ArchiveFreeCallbackRaw a))

-- | Don't use an open callback. This is the recommended argument to 'archiveReadOpen'
noOpenCallback :: FunPtr (ArchiveOpenCallbackRaw a)
noOpenCallback :: FunPtr (ArchiveOpenCallbackRaw a)
noOpenCallback = Ptr Any -> FunPtr (ArchiveOpenCallbackRaw a)
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr

foreign import ccall "wrapper" mkWriteLookup :: (Ptr a -> CString -> LaInt64 -> IO LaInt64) -> IO (FunPtr (Ptr a -> CString -> LaInt64 -> IO LaInt64))
-- | Also for 'archiveReadDiskSetGnameLookup' and 'archiveReadDiskSetUnameLookup'
foreign import ccall "wrapper" mkReadLookup :: (Ptr a -> LaInt64 -> IO CString) -> IO (FunPtr (Ptr a -> LaInt64 -> IO CString))

-- | Can also be used with 'archiveReadExtractSetProgressCallback'
foreign import ccall "wrapper" mkCleanup :: (Ptr a -> IO ()) -> IO (FunPtr (Ptr a -> IO ()))

foreign import ccall "wrapper" mkMatch :: (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO ()) -> IO (FunPtr (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO ()))
foreign import ccall "wrapper" preMkFilter :: (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO CInt) -> IO (FunPtr (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO CInt))

mkOpenCallback :: ArchiveOpenCallback a -> IO (FunPtr (ArchiveOpenCallbackRaw a))
mkOpenCallback :: ArchiveOpenCallback a -> IO (FunPtr (ArchiveOpenCallbackRaw a))
mkOpenCallback ArchiveOpenCallback a
f = let f' :: ArchiveOpenCallbackRaw a
f' = (ArchiveResult -> CInt) -> IO ArchiveResult -> IO CInt
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ArchiveResult -> CInt
resultToErr (IO ArchiveResult -> IO CInt)
-> ArchiveOpenCallback a -> ArchiveOpenCallbackRaw a
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
.* ArchiveOpenCallback a
f in ArchiveOpenCallbackRaw a -> IO (FunPtr (ArchiveOpenCallbackRaw a))
forall a.
ArchiveOpenCallbackRaw a -> IO (FunPtr (ArchiveOpenCallbackRaw a))
mkOpenCallbackRaw ArchiveOpenCallbackRaw a
f'

mkCloseCallback :: ArchiveCloseCallback a -> IO (FunPtr (ArchiveCloseCallbackRaw a))
mkCloseCallback :: ArchiveCloseCallback a -> IO (FunPtr (ArchiveCloseCallbackRaw a))
mkCloseCallback ArchiveCloseCallback a
f = let f' :: ArchiveCloseCallbackRaw a
f' = (ArchiveResult -> CInt) -> IO ArchiveResult -> IO CInt
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ArchiveResult -> CInt
resultToErr (IO ArchiveResult -> IO CInt)
-> ArchiveCloseCallback a -> ArchiveCloseCallbackRaw a
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
.* ArchiveCloseCallback a
f in ArchiveCloseCallbackRaw a
-> IO (FunPtr (ArchiveCloseCallbackRaw a))
forall a.
ArchiveOpenCallbackRaw a -> IO (FunPtr (ArchiveOpenCallbackRaw a))
mkCloseCallbackRaw ArchiveCloseCallbackRaw a
f'

mkSwitchCallback :: ArchiveSwitchCallback a b -> IO (FunPtr (ArchiveSwitchCallbackRaw a b))
mkSwitchCallback :: ArchiveSwitchCallback a b
-> IO (FunPtr (ArchiveSwitchCallbackRaw a b))
mkSwitchCallback ArchiveSwitchCallback a b
f = let f' :: ArchiveSwitchCallbackRaw a b
f' = (ArchiveResult -> CInt) -> IO ArchiveResult -> IO CInt
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ArchiveResult -> CInt
resultToErr (IO ArchiveResult -> IO CInt)
-> ArchiveSwitchCallback a b -> ArchiveSwitchCallbackRaw a b
forall d e a b c.
(d -> e) -> (a -> b -> c -> d) -> a -> b -> c -> e
.** ArchiveSwitchCallback a b
f in ArchiveSwitchCallbackRaw a b
-> IO (FunPtr (ArchiveSwitchCallbackRaw a b))
forall a b.
ArchiveSwitchCallbackRaw a b
-> IO (FunPtr (ArchiveSwitchCallbackRaw a b))
mkSwitchCallbackRaw ArchiveSwitchCallbackRaw a b
f'

mkFreeCallback :: ArchiveFreeCallback a -> IO (FunPtr (ArchiveFreeCallbackRaw a))
mkFreeCallback :: ArchiveFreeCallback a -> IO (FunPtr (ArchiveFreeCallbackRaw a))
mkFreeCallback ArchiveFreeCallback a
f = let f' :: ArchiveFreeCallbackRaw a
f' = (ArchiveResult -> CInt) -> IO ArchiveResult -> IO CInt
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap ArchiveResult -> CInt
resultToErr (IO ArchiveResult -> IO CInt)
-> ArchiveFreeCallback a -> ArchiveFreeCallbackRaw a
forall c d a b. (c -> d) -> (a -> b -> c) -> a -> b -> d
.* ArchiveFreeCallback a
f in ArchiveFreeCallbackRaw a -> IO (FunPtr (ArchiveFreeCallbackRaw a))
forall a.
ArchiveOpenCallbackRaw a -> IO (FunPtr (ArchiveOpenCallbackRaw a))
mkFreeCallbackRaw ArchiveFreeCallbackRaw a
f'

mkFilter :: (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO Bool) -> IO (FunPtr (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO CInt))
mkFilter :: (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO Bool)
-> IO
     (FunPtr (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO CInt))
mkFilter Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO Bool
f = let f' :: Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO CInt
f' = (Bool -> CInt) -> IO Bool -> IO CInt
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap Bool -> CInt
forall p. Num p => Bool -> p
boolToInt (IO Bool -> IO CInt)
-> (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO Bool)
-> Ptr Archive
-> Ptr a
-> Ptr ArchiveEntry
-> IO CInt
forall d e a b c.
(d -> e) -> (a -> b -> c -> d) -> a -> b -> c -> e
.** Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO Bool
f in (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO CInt)
-> IO
     (FunPtr (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO CInt))
forall a.
(Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO CInt)
-> IO
     (FunPtr (Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO CInt))
preMkFilter Ptr Archive -> Ptr a -> Ptr ArchiveEntry -> IO CInt
f'
    where boolToInt :: Bool -> p
boolToInt Bool
False = p
0
          boolToInt Bool
True  = p
1




type ArchivePtr = C2HSImp.ForeignPtr (Archive)
{-# LINE 393 "src/Codec/Archive/Foreign/Archive.chs" #-}

type ArchiveEntryPtr = C2HSImp.ForeignPtr (ArchiveEntry)
{-# LINE 394 "src/Codec/Archive/Foreign/Archive.chs" #-}

type StatPtr = C2HSImp.Ptr (Stat)
{-# LINE 395 "src/Codec/Archive/Foreign/Archive.chs" #-}

-- | @FILE*@ in C
newtype FilePtr = FilePtr (C2HSImp.Ptr (FilePtr))
{-# LINE 397 "src/Codec/Archive/Foreign/Archive.chs" #-}



{-# LINE 399 "src/Codec/Archive/Foreign/Archive.chs" #-}


{-# LINE 400 "src/Codec/Archive/Foreign/Archive.chs" #-}


{-# LINE 401 "src/Codec/Archive/Foreign/Archive.chs" #-}


{-# LINE 402 "src/Codec/Archive/Foreign/Archive.chs" #-}


{-# LINE 403 "src/Codec/Archive/Foreign/Archive.chs" #-}



{-# LINE 405 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveZlibVersion :: IO ((CString))
archiveZlibVersion :: IO CString
archiveZlibVersion =
  IO CString
archiveZlibVersion'_ IO CString -> (CString -> IO CString) -> IO CString
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \CString
res ->
  CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
res IO CString -> (CString -> IO CString) -> IO CString
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= \CString
res' ->
  CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return (CString
res')

{-# LINE 407 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveLiblzmaVersion :: IO ((CString))
archiveLiblzmaVersion =
  archiveLiblzmaVersion'_ >>= \res ->
  return res >>= \res' ->
  return (res')

{-# LINE 408 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveBzlibVersion :: IO ((CString))
archiveBzlibVersion =
  archiveBzlibVersion'_ >>= \res ->
  return res >>= \res' ->
  return (res')

{-# LINE 409 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveLiblz4Version :: IO ((CString))
archiveLiblz4Version =
  archiveLiblz4Version'_ >>= \res ->
  return res >>= \res' ->
  return (res')

{-# LINE 410 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveLibzstdVersion :: IO ((CString))
archiveLibzstdVersion =
  archiveLibzstdVersion'_ >>= \res ->
  return res >>= \res' ->
  return (res')

{-# LINE 411 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveErrorString :: (ArchivePtr) -> IO ((CString))
archiveErrorString a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveErrorString'_ a1' >>= \res ->
  return res >>= \res' ->
  return (res')

{-# LINE 413 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveFormatName :: (ArchivePtr) -> IO ((CString))
archiveFormatName a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveFormatName'_ a1' >>= \res ->
  return res >>= \res' ->
  return (res')

{-# LINE 414 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveFormat :: (ArchivePtr) -> IO ((ArchiveFormat))
archiveFormat a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveFormat'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 415 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveClearError :: (ArchivePtr) -> IO ()
archiveClearError a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveClearError'_ a1' >>
  return ()

{-# LINE 416 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveSetError :: (ArchivePtr) -> (CInt) -> (CString) -> IO ()
archiveSetError a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = fromIntegral a2} in 
  (flip ($)) a3 $ \a3' -> 
  archiveSetError'_ a1' a2' a3' >>
  return ()

{-# LINE 417 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveCopyError :: (ArchivePtr) -> (ArchivePtr) -> IO ()
archiveCopyError a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  C2HSImp.withForeignPtr a2 $ \a2' -> 
  archiveCopyError'_ a1' a2' >>
  return ()

{-# LINE 418 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveFileCount :: (ArchivePtr) -> IO ((CInt))
archiveFileCount a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveFileCount'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 419 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveVersionNumber :: (CInt)
archiveVersionNumber =
  C2HSImp.unsafePerformIO $
  archiveVersionNumber'_ >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 420 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveVersionString :: (String)
archiveVersionString =
  C2HSImp.unsafePerformIO $
  archiveVersionString'_ >>= \res ->
  C2HSImp.peekCString res >>= \res' ->
  return (res')

{-# LINE 421 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveVersionDetails :: (String)
archiveVersionDetails =
  C2HSImp.unsafePerformIO $
  archiveVersionDetails'_ >>= \res ->
  C2HSImp.peekCString res >>= \res' ->
  return (res')

{-# LINE 422 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveFilterCount :: (ArchivePtr) -> IO ((CInt))
archiveFilterCount a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveFilterCount'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 423 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveFilterBytes :: (ArchivePtr) -> (CInt) -> IO ((LaInt64))
archiveFilterBytes a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = fromIntegral a2} in 
  archiveFilterBytes'_ a1' a2' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 424 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveFilterCode :: (ArchivePtr) -> (CInt) -> IO ((Int))
archiveFilterCode a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = fromIntegral a2} in 
  archiveFilterCode'_ a1' a2' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 425 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveFilterName :: (ArchivePtr) -> (CInt) -> IO ((CString))
archiveFilterName a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = fromIntegral a2} in 
  archiveFilterName'_ a1' a2' >>= \res ->
  return res >>= \res' ->
  return (res')

{-# LINE 426 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveReadNew :: IO ((Ptr Archive))
archiveReadNew =
  archiveReadNew'_ >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 428 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveFree :: (Ptr Archive) -> IO ((CInt))
archiveFree a1 =
  let {a1' = id a1} in 
  archiveFree'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 430 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveMatchExcluded :: (ArchivePtr) -> (ArchiveEntryPtr) -> IO ((Bool))
archiveMatchExcluded a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  C2HSImp.withForeignPtr a2 $ \a2' -> 
  archiveMatchExcluded'_ a1' a2' >>= \res ->
  let {res' = C2HSImp.toBool res} in
  return (res')

{-# LINE 432 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchPathExcluded :: (ArchivePtr) -> (ArchiveEntryPtr) -> IO ((Bool))
archiveMatchPathExcluded a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  C2HSImp.withForeignPtr a2 $ \a2' -> 
  archiveMatchPathExcluded'_ a1' a2' >>= \res ->
  let {res' = C2HSImp.toBool res} in
  return (res')

{-# LINE 433 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchExcludePattern :: (ArchivePtr) -> (CString) -> IO ((ArchiveResult))
archiveMatchExcludePattern a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  archiveMatchExcludePattern'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 434 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchExcludePatternW :: (ArchivePtr) -> (CWString) -> IO ((ArchiveResult))
archiveMatchExcludePatternW a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  archiveMatchExcludePatternW'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 435 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchSetInclusionRecursion :: (ArchivePtr) -> (Bool) -> IO ((ArchiveResult))
archiveMatchSetInclusionRecursion a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = C2HSImp.fromBool a2} in 
  archiveMatchSetInclusionRecursion'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 436 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchExcludePatternFromFile :: (ArchivePtr) -> (CString) -> (Bool) -> IO ((ArchiveResult))
archiveMatchExcludePatternFromFile a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  let {a3' = C2HSImp.fromBool a3} in 
  archiveMatchExcludePatternFromFile'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 437 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchExcludePatternFromFileW :: (ArchivePtr) -> (CWString) -> (Bool) -> IO ((ArchiveResult))
archiveMatchExcludePatternFromFileW a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = C2HSImp.fromBool a3} in 
  archiveMatchExcludePatternFromFileW'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 438 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchIncludePattern :: (ArchivePtr) -> (CString) -> IO ((ArchiveResult))
archiveMatchIncludePattern a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  archiveMatchIncludePattern'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 439 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchIncludePatternW :: (ArchivePtr) -> (CWString) -> IO ((ArchiveResult))
archiveMatchIncludePatternW a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  archiveMatchIncludePatternW'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 440 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchIncludePatternFromFile :: (ArchivePtr) -> (CString) -> (Bool) -> IO ((ArchiveResult))
archiveMatchIncludePatternFromFile a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  let {a3' = C2HSImp.fromBool a3} in 
  archiveMatchIncludePatternFromFile'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 441 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchIncludePatternFromFileW :: (ArchivePtr) -> (CWString) -> (Bool) -> IO ((ArchiveResult))
archiveMatchIncludePatternFromFileW a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = C2HSImp.fromBool a3} in 
  archiveMatchIncludePatternFromFileW'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 442 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchPathUnmatchedInclusions :: (ArchivePtr) -> IO ((CInt))
archiveMatchPathUnmatchedInclusions a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveMatchPathUnmatchedInclusions'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 443 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchPathUnmatchedInclusionsNext :: (ArchivePtr) -> IO ((ArchiveResult), (CString))
archiveMatchPathUnmatchedInclusionsNext a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  alloca $ \a2' -> 
  archiveMatchPathUnmatchedInclusionsNext'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  peek  a2'>>= \a2'' -> 
  return (res', a2'')

{-# LINE 444 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchPathUnmatchedInclusionsNextW :: (ArchivePtr) -> IO ((ArchiveResult), (CWString))
archiveMatchPathUnmatchedInclusionsNextW a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  alloca $ \a2' -> 
  archiveMatchPathUnmatchedInclusionsNextW'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  peek  a2'>>= \a2'' -> 
  return (res', a2'')

{-# LINE 445 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchTimeExcluded :: (ArchivePtr) -> (ArchiveEntryPtr) -> IO ((Bool))
archiveMatchTimeExcluded a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  C2HSImp.withForeignPtr a2 $ \a2' -> 
  archiveMatchTimeExcluded'_ a1' a2' >>= \res ->
  let {res' = C2HSImp.toBool res} in
  return (res')

{-# LINE 446 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchIncludeTime :: (ArchivePtr) -> (TimeFlag) -> (CTime) -> (CLong) -> IO ((ArchiveResult))
archiveMatchIncludeTime a1 a2 a3 a4 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = coerce a2} in 
  let {a3' = id a3} in 
  let {a4' = fromIntegral a4} in 
  archiveMatchIncludeTime'_ a1' a2' a3' a4' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 447 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchIncludeDate :: (ArchivePtr) -> (TimeFlag) -> (CString) -> IO ((ArchiveResult))
archiveMatchIncludeDate a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = coerce a2} in 
  (flip ($)) a3 $ \a3' -> 
  archiveMatchIncludeDate'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 448 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchIncludeDateW :: (ArchivePtr) -> (TimeFlag) -> (CWString) -> IO ((ArchiveResult))
archiveMatchIncludeDateW a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = coerce a2} in 
  let {a3' = castPtr a3} in 
  archiveMatchIncludeDateW'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 449 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchIncludeFileTime :: (ArchivePtr) -> (TimeFlag) -> (CString) -> IO ((ArchiveResult))
archiveMatchIncludeFileTime a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = coerce a2} in 
  (flip ($)) a3 $ \a3' -> 
  archiveMatchIncludeFileTime'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 450 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchIncludeFileTimeW :: (ArchivePtr) -> (TimeFlag) -> (CWString) -> IO ((ArchiveResult))
archiveMatchIncludeFileTimeW a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = coerce a2} in 
  let {a3' = castPtr a3} in 
  archiveMatchIncludeFileTimeW'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 451 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchExcludeEntry :: (ArchivePtr) -> (TimeFlag) -> (ArchiveEntryPtr) -> IO ((ArchiveResult))
archiveMatchExcludeEntry a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = coerce a2} in 
  C2HSImp.withForeignPtr a3 $ \a3' -> 
  archiveMatchExcludeEntry'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 452 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveMatchOwnerExcluded :: (ArchivePtr) -> (ArchiveEntryPtr) -> IO ((Bool))
archiveMatchOwnerExcluded a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  C2HSImp.withForeignPtr a2 $ \a2' -> 
  archiveMatchOwnerExcluded'_ a1' a2' >>= \res ->
  let {res' = C2HSImp.toBool res} in
  return (res')

{-# LINE 454 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveReadSetOpenCallback :: (ArchivePtr) -> (FunPtr (ArchiveOpenCallbackRaw a)) -> IO ((ArchiveResult))
archiveReadSetOpenCallback a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castFunPtr a2} in 
  archiveReadSetOpenCallback'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 456 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSetReadCallback :: (ArchivePtr) -> (FunPtr (ArchiveReadCallback a b)) -> IO ((ArchiveResult))
archiveReadSetReadCallback a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castFunPtr a2} in 
  archiveReadSetReadCallback'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 457 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSetSeekCallback :: (ArchivePtr) -> (FunPtr (ArchiveSeekCallback a)) -> IO ((ArchiveResult))
archiveReadSetSeekCallback a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castFunPtr a2} in 
  archiveReadSetSeekCallback'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 458 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSetSkipCallback :: (ArchivePtr) -> (FunPtr (ArchiveSeekCallback a)) -> IO ((ArchiveResult))
archiveReadSetSkipCallback a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castFunPtr a2} in 
  archiveReadSetSkipCallback'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 459 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSetCloseCallback :: (ArchivePtr) -> (FunPtr (ArchiveCloseCallbackRaw a)) -> IO ((ArchiveResult))
archiveReadSetCloseCallback a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castFunPtr a2} in 
  archiveReadSetCloseCallback'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 460 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSetSwitchCallback :: (ArchivePtr) -> (FunPtr (ArchiveSwitchCallbackRaw a n)) -> IO ((ArchiveResult))
archiveReadSetSwitchCallback a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castFunPtr a2} in 
  archiveReadSetSwitchCallback'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 461 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveReadSetCallbackData :: (ArchivePtr) -> (Ptr a) -> IO ((ArchiveResult))
archiveReadSetCallbackData a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  archiveReadSetCallbackData'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 463 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSetCallbackData2 :: (ArchivePtr) -> (Ptr a) -> (CUInt) -> IO ((ArchiveResult))
archiveReadSetCallbackData2 a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = fromIntegral a3} in 
  archiveReadSetCallbackData2'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 464 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadAddCallbackData :: (ArchivePtr) -> (Ptr a) -> (CUInt) -> IO ((ArchiveResult))
archiveReadAddCallbackData a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = fromIntegral a3} in 
  archiveReadAddCallbackData'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 465 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadAppendCallbackData :: (ArchivePtr) -> (Ptr a) -> IO ((ArchiveResult))
archiveReadAppendCallbackData a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  archiveReadAppendCallbackData'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 466 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadPrependCallbackData :: (ArchivePtr) -> (Ptr a) -> IO ((ArchiveResult))
archiveReadPrependCallbackData a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  archiveReadPrependCallbackData'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 467 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveReadOpen1 :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadOpen1 a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadOpen1'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 469 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadOpen :: (ArchivePtr) -> (Ptr a) -> (FunPtr (ArchiveOpenCallbackRaw a)) -> (FunPtr (ArchiveReadCallback a b)) -> (FunPtr (ArchiveCloseCallbackRaw a)) -> IO ((ArchiveResult))
archiveReadOpen a1 a2 a3 a4 a5 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = castFunPtr a3} in 
  let {a4' = castFunPtr a4} in 
  let {a5' = castFunPtr a5} in 
  archiveReadOpen'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 475 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadOpen2 :: (ArchivePtr) -> (Ptr a) -> (FunPtr (ArchiveOpenCallbackRaw a)) -> (FunPtr (ArchiveReadCallback a b)) -> (FunPtr (ArchiveSkipCallback a)) -> (FunPtr (ArchiveCloseCallbackRaw a)) -> IO ((ArchiveResult))
archiveReadOpen2 a1 a2 a3 a4 a5 a6 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = castFunPtr a3} in 
  let {a4' = castFunPtr a4} in 
  let {a5' = castFunPtr a5} in 
  let {a6' = castFunPtr a6} in 
  archiveReadOpen2'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 482 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveReadOpenFilename :: (ArchivePtr) -> (CString) -> (CSize) -> IO ((ArchiveResult))
archiveReadOpenFilename a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  let {a3' = id a3} in 
  archiveReadOpenFilename'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 484 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadOpenFilenameW :: (ArchivePtr) -> (CWString) -> (CSize) -> IO ((ArchiveResult))
archiveReadOpenFilenameW a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = id a3} in 
  archiveReadOpenFilenameW'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 485 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadOpenFilenames :: (ArchivePtr) -> (Ptr CString) -> (CSize) -> IO ((ArchiveResult))
archiveReadOpenFilenames a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  archiveReadOpenFilenames'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 486 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadOpenMemory :: (ArchivePtr) -> (Ptr a) -> (CSize) -> IO ((ArchiveResult))
archiveReadOpenMemory a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = id a3} in 
  archiveReadOpenMemory'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 487 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadOpenFd :: (ArchivePtr) -> (Fd) -> (CSize) -> IO ((ArchiveResult))
archiveReadOpenFd a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = coerce a2} in 
  let {a3' = id a3} in 
  archiveReadOpenFd'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 488 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadOpenFILE :: (ArchivePtr) -> (FilePtr) -> IO ((ArchiveResult))
archiveReadOpenFILE a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = id a2} in 
  archiveReadOpenFILE'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 489 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadNextHeader :: (ArchivePtr) -> IO ((ArchiveResult), (Ptr ArchiveEntry))
archiveReadNextHeader a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  alloca $ \a2' -> 
  archiveReadNextHeader'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  peek  a2'>>= \a2'' -> 
  return (res', a2'')

{-# LINE 490 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadNextHeader2 :: (ArchivePtr) -> (ArchiveEntryPtr) -> IO ((ArchiveResult))
archiveReadNextHeader2 a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  C2HSImp.withForeignPtr a2 $ \a2' -> 
  archiveReadNextHeader2'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 491 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadHeaderPosition :: (ArchivePtr) -> IO ((LaInt64))
archiveReadHeaderPosition a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadHeaderPosition'_ a1' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 492 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadHasEncryptedEntries :: (ArchivePtr) -> IO ((ArchiveEncryption))
archiveReadHasEncryptedEntries a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadHasEncryptedEntries'_ a1' >>= \res ->
  let {res' = encryptionResult res} in
  return (res')

{-# LINE 493 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadFormatCapabilities :: (ArchivePtr) -> IO ((ArchiveCapabilities))
archiveReadFormatCapabilities a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadFormatCapabilities'_ a1' >>= \res ->
  let {res' = ArchiveCapabilities res} in
  return (res')

{-# LINE 494 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadData :: (ArchivePtr) -> (Ptr a) -> (CSize) -> IO ((LaSSize))
archiveReadData a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = id a3} in 
  archiveReadData'_ a1' a2' a3' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 495 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveSeekData :: (ArchivePtr) -> (LaInt64) -> (CInt) -> IO ((LaInt64))
archiveSeekData a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = id a2} in 
  let {a3' = fromIntegral a3} in 
  archiveSeekData'_ a1' a2' a3' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 496 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDataBlock :: (ArchivePtr) -> (Ptr (Ptr a)) -> (Ptr CSize) -> (Ptr LaInt64) -> IO ((ArchiveResult))
archiveReadDataBlock a1 a2 a3 a4 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  archiveReadDataBlock'_ a1' a2' a3' a4' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 497 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDataSkip :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadDataSkip a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadDataSkip'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 498 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDataIntoFd :: (ArchivePtr) -> (Fd) -> IO ((ArchiveResult))
archiveReadDataIntoFd a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = coerce a2} in 
  archiveReadDataIntoFd'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 499 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSetFormatOption :: (ArchivePtr) -> (CString) -> (CString) -> (CString) -> IO ((ArchiveResult))
archiveReadSetFormatOption a1 a2 a3 a4 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  (flip ($)) a3 $ \a3' -> 
  (flip ($)) a4 $ \a4' -> 
  archiveReadSetFormatOption'_ a1' a2' a3' a4' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 500 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSetFilterOption :: (ArchivePtr) -> (CString) -> (CString) -> (CString) -> IO ((ArchiveResult))
archiveReadSetFilterOption a1 a2 a3 a4 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  (flip ($)) a3 $ \a3' -> 
  (flip ($)) a4 $ \a4' -> 
  archiveReadSetFilterOption'_ a1' a2' a3' a4' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 501 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSetOption :: (ArchivePtr) -> (CString) -> (CString) -> (CString) -> IO ((ArchiveResult))
archiveReadSetOption a1 a2 a3 a4 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  (flip ($)) a3 $ \a3' -> 
  (flip ($)) a4 $ \a4' -> 
  archiveReadSetOption'_ a1' a2' a3' a4' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 502 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSetOptions :: (ArchivePtr) -> (CString) -> IO ((ArchiveResult))
archiveReadSetOptions a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  archiveReadSetOptions'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 503 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveReadAddPassphrase :: (ArchivePtr) -> (CString) -> IO ((ArchiveResult))
archiveReadAddPassphrase a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  archiveReadAddPassphrase'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 505 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSetPassphraseCallback :: (ArchivePtr) -> (Ptr a) -> (FunPtr (ArchivePassphraseCallback a)) -> IO ((ArchiveResult))
archiveReadSetPassphraseCallback a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = castFunPtr a3} in 
  archiveReadSetPassphraseCallback'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 506 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveReadExtract :: (ArchivePtr) -> (ArchiveEntryPtr) -> (Flags) -> IO ((ArchiveResult))
archiveReadExtract a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  C2HSImp.withForeignPtr a2 $ \a2' -> 
  let {a3' = coerce a3} in 
  archiveReadExtract'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 508 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadExtract2 :: (ArchivePtr) -> (ArchiveEntryPtr) -> (ArchivePtr) -> IO ((ArchiveResult))
archiveReadExtract2 a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  C2HSImp.withForeignPtr a2 $ \a2' -> 
  C2HSImp.withForeignPtr a3 $ \a3' -> 
  archiveReadExtract2'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 509 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadExtractSetProgressCallback :: (ArchivePtr) -> (FunPtr (Ptr a -> IO ())) -> (Ptr a) -> IO ((()))
archiveReadExtractSetProgressCallback a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castFunPtr a2} in 
  let {a3' = castPtr a3} in 
  archiveReadExtractSetProgressCallback'_ a1' a2' a3' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 510 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadExtractSetSkipFile :: (ArchivePtr) -> (LaInt64) -> (LaInt64) -> IO ()
archiveReadExtractSetSkipFile a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  archiveReadExtractSetSkipFile'_ a1' a2' a3' >>
  return ()

{-# LINE 511 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadClose :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadClose a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadClose'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 512 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadFree :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadFree a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadFree'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 513 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveWriteNew :: IO ((Ptr Archive))
archiveWriteNew =
  archiveWriteNew'_ >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 515 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetBytesPerBlock :: (ArchivePtr) -> (CInt) -> IO ((ArchiveResult))
archiveWriteSetBytesPerBlock a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = fromIntegral a2} in 
  archiveWriteSetBytesPerBlock'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 516 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteGetBytesPerBlock :: (ArchivePtr) -> IO ((CInt))
archiveWriteGetBytesPerBlock a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteGetBytesPerBlock'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 517 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetBytesInLastBlock :: (ArchivePtr) -> (CInt) -> IO ((ArchiveResult))
archiveWriteSetBytesInLastBlock a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = fromIntegral a2} in 
  archiveWriteSetBytesInLastBlock'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 518 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteGetBytesInLastBlock :: (ArchivePtr) -> IO ((CInt))
archiveWriteGetBytesInLastBlock a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteGetBytesInLastBlock'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 519 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetSkipFile :: (ArchivePtr) -> (LaInt64) -> (LaInt64) -> IO ((ArchiveResult))
archiveWriteSetSkipFile a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  archiveWriteSetSkipFile'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 520 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteAddFilter :: (ArchivePtr) -> (ArchiveFilter) -> IO ((ArchiveResult))
archiveWriteAddFilter a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = (fromIntegral . fromEnum) a2} in 
  archiveWriteAddFilter'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 521 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteAddFilterByName :: (ArchivePtr) -> (CString) -> IO ((ArchiveResult))
archiveWriteAddFilterByName a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  archiveWriteAddFilterByName'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 522 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteAddFilterB64encode :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteAddFilterB64encode a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteAddFilterB64encode'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 523 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteAddFilterBzip2 :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteAddFilterBzip2 a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteAddFilterBzip2'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 524 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteAddFilterCompress :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteAddFilterCompress a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteAddFilterCompress'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 525 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteAddFilterGrzip :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteAddFilterGrzip a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteAddFilterGrzip'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 526 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteAddFilterLrzip :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteAddFilterLrzip a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteAddFilterLrzip'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 527 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteAddFilterLz4 :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteAddFilterLz4 a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteAddFilterLz4'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 528 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteAddFilterLzip :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteAddFilterLzip a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteAddFilterLzip'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 529 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteAddFilterLzma :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteAddFilterLzma a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteAddFilterLzma'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 530 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteAddFilterLzop :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteAddFilterLzop a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteAddFilterLzop'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 531 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteAddFilterNone :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteAddFilterNone a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteAddFilterNone'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 532 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteAddFilterProgram :: (ArchivePtr) -> (CString) -> IO ((ArchiveResult))
archiveWriteAddFilterProgram a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  archiveWriteAddFilterProgram'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 533 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteAddFilterUuencode :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteAddFilterUuencode a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteAddFilterUuencode'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 534 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteAddFilterXz :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteAddFilterXz a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteAddFilterXz'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 535 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteAddFilterZstd :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteAddFilterZstd a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteAddFilterZstd'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 536 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveWriteSetFormat :: (ArchivePtr) -> (ArchiveFormat) -> IO ((ArchiveResult))
archiveWriteSetFormat a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = (fromIntegral . fromEnum) a2} in 
  archiveWriteSetFormat'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 538 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatByName :: (ArchivePtr) -> (CString) -> IO ((ArchiveResult))
archiveWriteSetFormatByName a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  archiveWriteSetFormatByName'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 539 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormat7zip :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteSetFormat7zip a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteSetFormat7zip'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 540 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatArBsd :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteSetFormatArBsd a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteSetFormatArBsd'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 541 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatArSvr4 :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteSetFormatArSvr4 a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteSetFormatArSvr4'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 542 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatCpio :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteSetFormatCpio a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteSetFormatCpio'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 543 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatCpioNewc :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteSetFormatCpioNewc a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteSetFormatCpioNewc'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 544 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatGnutar :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteSetFormatGnutar a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteSetFormatGnutar'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 545 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatMtree :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteSetFormatMtree a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteSetFormatMtree'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 546 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatMtreeClassic :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteSetFormatMtreeClassic a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteSetFormatMtreeClassic'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 547 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatPax :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteSetFormatPax a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteSetFormatPax'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 548 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatPaxRestricted :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteSetFormatPaxRestricted a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteSetFormatPaxRestricted'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 549 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatRaw :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteSetFormatRaw a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteSetFormatRaw'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 550 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatShar :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteSetFormatShar a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteSetFormatShar'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 551 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatSharDump :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteSetFormatSharDump a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteSetFormatSharDump'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 552 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatUstar :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteSetFormatUstar a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteSetFormatUstar'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 553 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatV7tar :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteSetFormatV7tar a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteSetFormatV7tar'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 554 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatWarc :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteSetFormatWarc a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteSetFormatWarc'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 555 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatXar :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteSetFormatXar a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteSetFormatXar'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 556 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatZip :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteSetFormatZip a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteSetFormatZip'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 557 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatFilterByExt :: (ArchivePtr) -> (CString) -> IO ((ArchiveResult))
archiveWriteSetFormatFilterByExt a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  archiveWriteSetFormatFilterByExt'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 558 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFormatFilterByExtDef :: (ArchivePtr) -> (CString) -> (CString) -> IO ((ArchiveResult))
archiveWriteSetFormatFilterByExtDef a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  (flip ($)) a3 $ \a3' -> 
  archiveWriteSetFormatFilterByExtDef'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 559 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteZipSetCompressionDeflate :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteZipSetCompressionDeflate a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteZipSetCompressionDeflate'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 560 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteZipSetCompressionStore :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteZipSetCompressionStore a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteZipSetCompressionStore'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 561 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteOpen :: (ArchivePtr) -> (Ptr a) -> (FunPtr (ArchiveOpenCallbackRaw a)) -> (FunPtr (ArchiveWriteCallback a b)) -> (FunPtr (ArchiveCloseCallbackRaw a)) -> IO ((ArchiveResult))
archiveWriteOpen a1 a2 a3 a4 a5 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = castFunPtr a3} in 
  let {a4' = castFunPtr a4} in 
  let {a5' = castFunPtr a5} in 
  archiveWriteOpen'_ a1' a2' a3' a4' a5' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 567 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteOpen2 :: (ArchivePtr) -> (Ptr a) -> (FunPtr (ArchiveOpenCallbackRaw a)) -> (FunPtr (ArchiveWriteCallback a b)) -> (FunPtr (ArchiveCloseCallbackRaw a)) -> (FunPtr (ArchiveFreeCallbackRaw a)) -> IO ((ArchiveResult))
archiveWriteOpen2 a1 a2 a3 a4 a5 a6 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = castFunPtr a3} in 
  let {a4' = castFunPtr a4} in 
  let {a5' = castFunPtr a5} in 
  let {a6' = castFunPtr a6} in 
  archiveWriteOpen2'_ a1' a2' a3' a4' a5' a6' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 574 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteOpenFd :: (ArchivePtr) -> (Fd) -> IO ((ArchiveResult))
archiveWriteOpenFd a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = coerce a2} in 
  archiveWriteOpenFd'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 575 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteOpenFilename :: (ArchivePtr) -> (CString) -> IO ((ArchiveResult))
archiveWriteOpenFilename a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  archiveWriteOpenFilename'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 576 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteOpenFilenameW :: (ArchivePtr) -> (CWString) -> IO ((ArchiveResult))
archiveWriteOpenFilenameW a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  archiveWriteOpenFilenameW'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 577 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteOpenFILE :: (ArchivePtr) -> (FilePtr) -> IO ((ArchiveResult))
archiveWriteOpenFILE a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = id a2} in 
  archiveWriteOpenFILE'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 578 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteOpenMemory :: (ArchivePtr) -> (Ptr a) -> (CSize) -> IO ((ArchiveResult), (CSize))
archiveWriteOpenMemory a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = id a3} in 
  alloca $ \a4' -> 
  archiveWriteOpenMemory'_ a1' a2' a3' a4' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  peek  a4'>>= \a4'' -> 
  return (res', a4'')

{-# LINE 579 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveWriteHeader :: (ArchivePtr) -> (ArchiveEntryPtr) -> IO ((ArchiveResult))
archiveWriteHeader a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  C2HSImp.withForeignPtr a2 $ \a2' -> 
  archiveWriteHeader'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 581 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteData :: (ArchivePtr) -> (Ptr a) -> (CSize) -> IO ((LaSSize))
archiveWriteData a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = id a3} in 
  archiveWriteData'_ a1' a2' a3' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 582 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteDataBlock :: (ArchivePtr) -> (Ptr a) -> (CSize) -> (LaInt64) -> IO ((LaSSize))
archiveWriteDataBlock a1 a2 a3 a4 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = id a3} in 
  let {a4' = id a4} in 
  archiveWriteDataBlock'_ a1' a2' a3' a4' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 583 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveWriteFinishEntry :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteFinishEntry a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteFinishEntry'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 585 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteClose :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteClose a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteClose'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 586 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteFail :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteFail a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteFail'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 587 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteFree :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteFree a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteFree'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 588 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveWriteSetFormatOption :: (ArchivePtr) -> (CString) -> (CString) -> (CString) -> IO ((ArchiveResult))
archiveWriteSetFormatOption a1 a2 a3 a4 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  (flip ($)) a3 $ \a3' -> 
  (flip ($)) a4 $ \a4' -> 
  archiveWriteSetFormatOption'_ a1' a2' a3' a4' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 590 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetFilterOption :: (ArchivePtr) -> (CString) -> (CString) -> (CString) -> IO ((ArchiveResult))
archiveWriteSetFilterOption a1 a2 a3 a4 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  (flip ($)) a3 $ \a3' -> 
  (flip ($)) a4 $ \a4' -> 
  archiveWriteSetFilterOption'_ a1' a2' a3' a4' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 591 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetOption :: (ArchivePtr) -> (CString) -> (CString) -> (CString) -> IO ((ArchiveResult))
archiveWriteSetOption a1 a2 a3 a4 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  (flip ($)) a3 $ \a3' -> 
  (flip ($)) a4 $ \a4' -> 
  archiveWriteSetOption'_ a1' a2' a3' a4' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 592 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetOptions :: (ArchivePtr) -> (CString) -> IO ((ArchiveResult))
archiveWriteSetOptions a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  archiveWriteSetOptions'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 593 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveWriteSetPassphrase :: (ArchivePtr) -> (CString) -> IO ((ArchiveResult))
archiveWriteSetPassphrase a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  archiveWriteSetPassphrase'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 595 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteSetPassphraseCallback :: (ArchivePtr) -> (Ptr a) -> (FunPtr (ArchivePassphraseCallback a)) -> IO ((ArchiveResult))
archiveWriteSetPassphraseCallback a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = castFunPtr a3} in 
  archiveWriteSetPassphraseCallback'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 596 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteDiskSetOptions :: (ArchivePtr) -> (Flags) -> IO ((ArchiveResult))
archiveWriteDiskSetOptions a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = coerce a2} in 
  archiveWriteDiskSetOptions'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 597 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveWriteDiskNew :: IO ((Ptr Archive))
archiveWriteDiskNew =
  archiveWriteDiskNew'_ >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 599 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteDiskSetSkipFile :: (ArchivePtr) -> (LaInt64) -> (LaInt64) -> IO ((ArchiveResult))
archiveWriteDiskSetSkipFile a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = id a2} in 
  let {a3' = id a3} in 
  archiveWriteDiskSetSkipFile'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 600 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveWriteDiskSetStandardLookup :: (ArchivePtr) -> IO ((ArchiveResult))
archiveWriteDiskSetStandardLookup a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveWriteDiskSetStandardLookup'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 602 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteDiskSetGroupLookup :: (ArchivePtr) -> (Ptr a) -> (FunPtr (Ptr a -> CString -> LaInt64 -> IO LaInt64)) -> (FunPtr (Ptr a -> IO ())) -> IO ((ArchiveResult))
archiveWriteDiskSetGroupLookup a1 a2 a3 a4 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = castFunPtr a3} in 
  let {a4' = castFunPtr a4} in 
  archiveWriteDiskSetGroupLookup'_ a1' a2' a3' a4' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 607 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteDiskSetUserLookup :: (ArchivePtr) -> (Ptr a) -> (FunPtr (Ptr a -> CString -> LaInt64 -> IO LaInt64)) -> (FunPtr (Ptr a -> IO ())) -> IO ((ArchiveResult))
archiveWriteDiskSetUserLookup a1 a2 a3 a4 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = castFunPtr a3} in 
  let {a4' = castFunPtr a4} in 
  archiveWriteDiskSetUserLookup'_ a1' a2' a3' a4' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 612 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteDiskGid :: (ArchivePtr) -> (CString) -> (LaInt64) -> IO ((LaInt64))
archiveWriteDiskGid a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  let {a3' = id a3} in 
  archiveWriteDiskGid'_ a1' a2' a3' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 613 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveWriteDiskUid :: (ArchivePtr) -> (CString) -> (LaInt64) -> IO ((LaInt64))
archiveWriteDiskUid a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  let {a3' = id a3} in 
  archiveWriteDiskUid'_ a1' a2' a3' >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 614 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveReadDiskNew :: IO ((Ptr Archive))
archiveReadDiskNew =
  archiveReadDiskNew'_ >>= \res ->
  let {res' = id res} in
  return (res')

{-# LINE 616 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDiskSetSymlinkLogical :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadDiskSetSymlinkLogical a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadDiskSetSymlinkLogical'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 617 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDiskSetSymlinkPhysical :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadDiskSetSymlinkPhysical a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadDiskSetSymlinkPhysical'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 618 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDiskSetSymlinkHybrid :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadDiskSetSymlinkHybrid a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadDiskSetSymlinkHybrid'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 619 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDiskEntryFromFile :: (ArchivePtr) -> (ArchiveEntryPtr) -> (Fd) -> (StatPtr) -> IO ((ArchiveResult))
archiveReadDiskEntryFromFile a1 a2 a3 a4 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  C2HSImp.withForeignPtr a2 $ \a2' -> 
  let {a3' = coerce a3} in 
  let {a4' = id a4} in 
  archiveReadDiskEntryFromFile'_ a1' a2' a3' a4' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 620 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDiskGname :: (ArchivePtr) -> (LaInt64) -> IO ((CString))
archiveReadDiskGname a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = id a2} in 
  archiveReadDiskGname'_ a1' a2' >>= \res ->
  return res >>= \res' ->
  return (res')

{-# LINE 621 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDiskUname :: (ArchivePtr) -> (LaInt64) -> IO ((CString))
archiveReadDiskUname a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = id a2} in 
  archiveReadDiskUname'_ a1' a2' >>= \res ->
  return res >>= \res' ->
  return (res')

{-# LINE 622 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDiskSetStandardLookup :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadDiskSetStandardLookup a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadDiskSetStandardLookup'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 623 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDiskSetGnameLookup :: (ArchivePtr) -> (Ptr a) -> (FunPtr (Ptr a -> LaInt64 -> IO CString )) -> (FunPtr (Ptr a -> IO ())) -> IO ((ArchiveResult))
archiveReadDiskSetGnameLookup a1 a2 a3 a4 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = castFunPtr a3} in 
  let {a4' = castFunPtr a4} in 
  archiveReadDiskSetGnameLookup'_ a1' a2' a3' a4' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 628 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDiskSetUnameLookup :: (ArchivePtr) -> (Ptr a) -> (FunPtr (Ptr a -> LaInt64 -> IO CString )) -> (FunPtr (Ptr a -> IO ())) -> IO ((ArchiveResult))
archiveReadDiskSetUnameLookup a1 a2 a3 a4 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  let {a3' = castFunPtr a3} in 
  let {a4' = castFunPtr a4} in 
  archiveReadDiskSetUnameLookup'_ a1' a2' a3' a4' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 633 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDiskOpen :: (ArchivePtr) -> (CString) -> IO ((ArchiveResult))
archiveReadDiskOpen a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  archiveReadDiskOpen'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 634 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDiskOpenW :: (ArchivePtr) -> (CWString) -> IO ((ArchiveResult))
archiveReadDiskOpenW a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  archiveReadDiskOpenW'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 635 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDiskDescend :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadDiskDescend a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadDiskDescend'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 636 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDiskCanDescend :: (ArchivePtr) -> IO ((Bool))
archiveReadDiskCanDescend a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadDiskCanDescend'_ a1' >>= \res ->
  let {res' = C2HSImp.toBool res} in
  return (res')

{-# LINE 637 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDiskCurrentFilesystem :: (ArchivePtr) -> IO ((CInt))
archiveReadDiskCurrentFilesystem a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadDiskCurrentFilesystem'_ a1' >>= \res ->
  let {res' = fromIntegral res} in
  return (res')

{-# LINE 638 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDiskCurrentFilesystemIsSynthetic :: (ArchivePtr) -> IO ((Bool))
archiveReadDiskCurrentFilesystemIsSynthetic a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadDiskCurrentFilesystemIsSynthetic'_ a1' >>= \res ->
  let {res' = C2HSImp.toBool res} in
  return (res')

{-# LINE 639 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDiskCurrentFilesystemIsRemote :: (ArchivePtr) -> IO ((Bool))
archiveReadDiskCurrentFilesystemIsRemote a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadDiskCurrentFilesystemIsRemote'_ a1' >>= \res ->
  let {res' = C2HSImp.toBool res} in
  return (res')

{-# LINE 640 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDiskSetAtimeRestored :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadDiskSetAtimeRestored a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadDiskSetAtimeRestored'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 641 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDiskSetBehavior :: (ArchivePtr) -> (Flags) -> IO ((ArchiveResult))
archiveReadDiskSetBehavior a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = coerce a2} in 
  archiveReadDiskSetBehavior'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 642 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveReadDiskSetMatching :: (ArchivePtr) -> (ArchivePtr) -> (FunPtr (ArchivePtr -> Ptr a -> ArchiveEntryPtr -> IO ())) -> (Ptr a) -> IO ((ArchiveResult))
archiveReadDiskSetMatching a1 a2 a3 a4 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  C2HSImp.withForeignPtr a2 $ \a2' -> 
  let {a3' = castFunPtr a3} in 
  let {a4' = castPtr a4} in 
  archiveReadDiskSetMatching'_ a1' a2' a3' a4' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 648 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadDiskSetMetadataFilterCallback :: (ArchivePtr) -> (FunPtr (ArchivePtr -> Ptr a -> ArchiveEntry -> IO CInt)) -> (Ptr a) -> IO ((ArchiveResult))
archiveReadDiskSetMetadataFilterCallback a1 a2 a3 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castFunPtr a2} in 
  let {a3' = castPtr a3} in 
  archiveReadDiskSetMetadataFilterCallback'_ a1' a2' a3' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 652 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveMatchIncludeGnameW :: (ArchivePtr) -> (CWString) -> IO ((ArchiveResult))
archiveMatchIncludeGnameW a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  archiveMatchIncludeGnameW'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 654 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchIncludeGname :: (ArchivePtr) -> (CString) -> IO ((ArchiveResult))
archiveMatchIncludeGname a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  archiveMatchIncludeGname'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 655 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchIncludeUnameW :: (ArchivePtr) -> (CWString) -> IO ((ArchiveResult))
archiveMatchIncludeUnameW a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = castPtr a2} in 
  archiveMatchIncludeUnameW'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 656 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchIncludeUname :: (ArchivePtr) -> (CString) -> IO ((ArchiveResult))
archiveMatchIncludeUname a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  archiveMatchIncludeUname'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 657 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchIncludeGid :: (ArchivePtr) -> (Id) -> IO ((ArchiveResult))
archiveMatchIncludeGid a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = coerce a2} in 
  archiveMatchIncludeGid'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 658 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveMatchIncludeUid :: (ArchivePtr) -> (Id) -> IO ((ArchiveResult))
archiveMatchIncludeUid a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = coerce a2} in 
  archiveMatchIncludeUid'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 659 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFilterAll :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFilterAll a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFilterAll'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 660 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFilterByCode :: (ArchivePtr) -> (CInt) -> IO ((ArchiveResult))
archiveReadSupportFilterByCode a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = fromIntegral a2} in 
  archiveReadSupportFilterByCode'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 661 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFilterBzip2 :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFilterBzip2 a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFilterBzip2'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 662 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFilterCompress :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFilterCompress a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFilterCompress'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 663 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFilterGzip :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFilterGzip a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFilterGzip'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 664 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFilterGrzip :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFilterGrzip a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFilterGrzip'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 665 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFilterLrzip :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFilterLrzip a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFilterLrzip'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 666 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFilterLz4 :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFilterLz4 a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFilterLz4'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 667 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFilterLzip :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFilterLzip a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFilterLzip'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 668 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFilterLzma :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFilterLzma a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFilterLzma'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 669 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFilterLzop :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFilterLzop a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFilterLzop'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 670 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFilterNone :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFilterNone a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFilterNone'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 671 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFilterProgram :: (ArchivePtr) -> (CString) -> IO ((ArchiveResult))
archiveReadSupportFilterProgram a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  archiveReadSupportFilterProgram'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 672 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFilterProgramSignature :: (ArchivePtr) -> (CString) -> (Ptr a) -> (CSize) -> IO ((ArchiveResult))
archiveReadSupportFilterProgramSignature a1 a2 a3 a4 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  let {a3' = castPtr a3} in 
  let {a4' = coerce a4} in 
  archiveReadSupportFilterProgramSignature'_ a1' a2' a3' a4' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 673 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFilterRpm :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFilterRpm a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFilterRpm'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 674 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFilterUu :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFilterUu a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFilterUu'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 675 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFilterXz :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFilterXz a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFilterXz'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 676 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormat7zip :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFormat7zip a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFormat7zip'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 677 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormatAll :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFormatAll a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFormatAll'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 678 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormatAr :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFormatAr a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFormatAr'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 679 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormatByCode :: (ArchivePtr) -> (CInt) -> IO ((ArchiveResult))
archiveReadSupportFormatByCode a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = fromIntegral a2} in 
  archiveReadSupportFormatByCode'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 680 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormatCab :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFormatCab a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFormatCab'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 681 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormatCpio :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFormatCpio a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFormatCpio'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 682 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormatEmpty :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFormatEmpty a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFormatEmpty'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 683 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormatGnutar :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFormatGnutar a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFormatGnutar'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 684 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormatIso9660 :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFormatIso9660 a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFormatIso9660'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 685 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormatLha :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFormatLha a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFormatLha'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 686 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormatMtree :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFormatMtree a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFormatMtree'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 687 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormatRar :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFormatRar a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFormatRar'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 688 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormatRar5 :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFormatRar5 a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFormatRar5'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 689 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormatRaw :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFormatRaw a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFormatRaw'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 690 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormatTar :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFormatTar a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFormatTar'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 691 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormatWarc :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFormatWarc a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFormatWarc'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 692 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormatXar :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFormatXar a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFormatXar'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 693 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormatZip :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFormatZip a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFormatZip'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 694 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormatZipStreamable :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFormatZipStreamable a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFormatZipStreamable'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 695 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadSupportFormatZipSeekable :: (ArchivePtr) -> IO ((ArchiveResult))
archiveReadSupportFormatZipSeekable a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveReadSupportFormatZipSeekable'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 696 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveReadSetFormat :: (ArchivePtr) -> (ArchiveFormat) -> IO ((ArchiveResult))
archiveReadSetFormat a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = (fromIntegral . fromEnum) a2} in 
  archiveReadSetFormat'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 698 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadAppendFilter :: (ArchivePtr) -> (CInt) -> IO ((ArchiveResult))
archiveReadAppendFilter a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  let {a2' = fromIntegral a2} in 
  archiveReadAppendFilter'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 699 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadAppendFilterProgram :: (ArchivePtr) -> (CString) -> IO ((ArchiveResult))
archiveReadAppendFilterProgram a1 a2 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  archiveReadAppendFilterProgram'_ a1' a2' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 700 "src/Codec/Archive/Foreign/Archive.chs" #-}

archiveReadAppendFilterProgramSignature :: (ArchivePtr) -> (CString) -> (Ptr a) -> (CSize) -> IO ((ArchiveResult))
archiveReadAppendFilterProgramSignature a1 a2 a3 a4 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  (flip ($)) a2 $ \a2' -> 
  let {a3' = castPtr a3} in 
  let {a4' = id a4} in 
  archiveReadAppendFilterProgramSignature'_ a1' a2' a3' a4' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 701 "src/Codec/Archive/Foreign/Archive.chs" #-}


archiveErrno :: (ArchivePtr) -> IO ((ArchiveResult))
archiveErrno a1 =
  C2HSImp.withForeignPtr a1 $ \a1' -> 
  archiveErrno'_ a1' >>= \res ->
  let {res' = (toEnum . fromIntegral) res} in
  return (res')

{-# LINE 703 "src/Codec/Archive/Foreign/Archive.chs" #-}


foreign import ccall "Codec/Archive/Foreign/Archive.chs.h &archive_entry_free"
  archiveEntryFree :: C2HSImp.FinalizerPtr ()

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_zlib_version"
  archiveZlibVersion'_ :: (IO (C2HSImp.Ptr C2HSImp.CChar))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_liblzma_version"
  archiveLiblzmaVersion'_ :: (IO (C2HSImp.Ptr C2HSImp.CChar))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_bzlib_version"
  archiveBzlibVersion'_ :: (IO (C2HSImp.Ptr C2HSImp.CChar))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_liblz4_version"
  archiveLiblz4Version'_ :: (IO (C2HSImp.Ptr C2HSImp.CChar))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_libzstd_version"
  archiveLibzstdVersion'_ :: (IO (C2HSImp.Ptr C2HSImp.CChar))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_error_string"
  archiveErrorString'_ :: ((C2HSImp.Ptr (Archive)) -> (IO (C2HSImp.Ptr C2HSImp.CChar)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_format_name"
  archiveFormatName'_ :: ((C2HSImp.Ptr (Archive)) -> (IO (C2HSImp.Ptr C2HSImp.CChar)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_format"
  archiveFormat'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_clear_error"
  archiveClearError'_ :: ((C2HSImp.Ptr (Archive)) -> (IO ()))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_set_error"
  archiveSetError'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO ()))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_copy_error"
  archiveCopyError'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr (Archive)) -> (IO ())))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_file_count"
  archiveFileCount'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_version_number"
  archiveVersionNumber'_ :: (IO C2HSImp.CInt)

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_version_string"
  archiveVersionString'_ :: (IO (C2HSImp.Ptr C2HSImp.CChar))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_version_details"
  archiveVersionDetails'_ :: (IO (C2HSImp.Ptr C2HSImp.CChar))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_filter_count"
  archiveFilterCount'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_filter_bytes"
  archiveFilterBytes'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> (IO LaInt64)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_filter_code"
  archiveFilterCode'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_filter_name"
  archiveFilterName'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> (IO (C2HSImp.Ptr C2HSImp.CChar))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_new"
  archiveReadNew'_ :: (IO (C2HSImp.Ptr (Archive)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_free"
  archiveFree'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_excluded"
  archiveMatchExcluded'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr (ArchiveEntry)) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_path_excluded"
  archiveMatchPathExcluded'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr (ArchiveEntry)) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_exclude_pattern"
  archiveMatchExcludePattern'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_exclude_pattern_w"
  archiveMatchExcludePatternW'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr CWchar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_set_inclusion_recursion"
  archiveMatchSetInclusionRecursion'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_exclude_pattern_from_file"
  archiveMatchExcludePatternFromFile'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CInt -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_exclude_pattern_from_file_w"
  archiveMatchExcludePatternFromFileW'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr CWchar) -> (C2HSImp.CInt -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_include_pattern"
  archiveMatchIncludePattern'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_include_pattern_w"
  archiveMatchIncludePatternW'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr CWchar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_include_pattern_from_file"
  archiveMatchIncludePatternFromFile'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (C2HSImp.CInt -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_include_pattern_from_file_w"
  archiveMatchIncludePatternFromFileW'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr CWchar) -> (C2HSImp.CInt -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_path_unmatched_inclusions"
  archiveMatchPathUnmatchedInclusions'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_path_unmatched_inclusions_next"
  archiveMatchPathUnmatchedInclusionsNext'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_path_unmatched_inclusions_next_w"
  archiveMatchPathUnmatchedInclusionsNextW'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr (C2HSImp.Ptr CWchar)) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_time_excluded"
  archiveMatchTimeExcluded'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr (ArchiveEntry)) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_include_time"
  archiveMatchIncludeTime'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> (CTime -> (C2HSImp.CLong -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_include_date"
  archiveMatchIncludeDate'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_include_date_w"
  archiveMatchIncludeDateW'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> ((C2HSImp.Ptr CWchar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_include_file_time"
  archiveMatchIncludeFileTime'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_include_file_time_w"
  archiveMatchIncludeFileTimeW'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> ((C2HSImp.Ptr CWchar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_exclude_entry"
  archiveMatchExcludeEntry'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> ((C2HSImp.Ptr (ArchiveEntry)) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_owner_excluded"
  archiveMatchOwnerExcluded'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr (ArchiveEntry)) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_set_open_callback"
  archiveReadSetOpenCallback'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_set_read_callback"
  archiveReadSetReadCallback'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO LaSSize))))) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_set_seek_callback"
  archiveReadSetSeekCallback'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (LaInt64 -> (C2HSImp.CInt -> (IO LaInt64)))))) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_set_skip_callback"
  archiveReadSetSkipCallback'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (LaInt64 -> (IO LaInt64))))) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_set_close_callback"
  archiveReadSetCloseCallback'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_set_switch_callback"
  archiveReadSetSwitchCallback'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))))) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_set_callback_data"
  archiveReadSetCallbackData'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_set_callback_data2"
  archiveReadSetCallbackData2'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (C2HSImp.CUInt -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_add_callback_data"
  archiveReadAddCallbackData'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (C2HSImp.CUInt -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_append_callback_data"
  archiveReadAppendCallbackData'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_prepend_callback_data"
  archiveReadPrependCallbackData'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_open1"
  archiveReadOpen1'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_open"
  archiveReadOpen'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO LaSSize))))) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_open2"
  archiveReadOpen2'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> (IO LaSSize))))) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (LaInt64 -> (IO LaInt64))))) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_open_filename"
  archiveReadOpenFilename'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (CSize -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_open_filename_w"
  archiveReadOpenFilenameW'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr CWchar) -> (CSize -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_open_filenames"
  archiveReadOpenFilenames'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr (C2HSImp.Ptr C2HSImp.CChar)) -> (CSize -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_open_memory"
  archiveReadOpenMemory'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (CSize -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_open_fd"
  archiveReadOpenFd'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> (CSize -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_open_FILE"
  archiveReadOpenFILE'_ :: ((C2HSImp.Ptr (Archive)) -> ((FilePtr) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_next_header"
  archiveReadNextHeader'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr (C2HSImp.Ptr (ArchiveEntry))) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_next_header2"
  archiveReadNextHeader2'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr (ArchiveEntry)) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_header_position"
  archiveReadHeaderPosition'_ :: ((C2HSImp.Ptr (Archive)) -> (IO LaInt64))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_has_encrypted_entries"
  archiveReadHasEncryptedEntries'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_format_capabilities"
  archiveReadFormatCapabilities'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_data"
  archiveReadData'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (CSize -> (IO LaSSize))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_seek_data"
  archiveSeekData'_ :: ((C2HSImp.Ptr (Archive)) -> (LaInt64 -> (C2HSImp.CInt -> (IO LaInt64))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_data_block"
  archiveReadDataBlock'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr (C2HSImp.Ptr ())) -> ((C2HSImp.Ptr CSize) -> ((C2HSImp.Ptr LaInt64) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_data_skip"
  archiveReadDataSkip'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_data_into_fd"
  archiveReadDataIntoFd'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_set_format_option"
  archiveReadSetFormatOption'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_set_filter_option"
  archiveReadSetFilterOption'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_set_option"
  archiveReadSetOption'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_set_options"
  archiveReadSetOptions'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_add_passphrase"
  archiveReadAddPassphrase'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_set_passphrase_callback"
  archiveReadSetPassphraseCallback'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr C2HSImp.CChar))))) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_extract"
  archiveReadExtract'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr (ArchiveEntry)) -> (C2HSImp.CInt -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_extract2"
  archiveReadExtract2'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr (ArchiveEntry)) -> ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_extract_set_progress_callback"
  archiveReadExtractSetProgressCallback'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> (IO ()))) -> ((C2HSImp.Ptr ()) -> (IO ()))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_extract_set_skip_file"
  archiveReadExtractSetSkipFile'_ :: ((C2HSImp.Ptr (Archive)) -> (LaInt64 -> (LaInt64 -> (IO ()))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_close"
  archiveReadClose'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_free"
  archiveReadFree'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_new"
  archiveWriteNew'_ :: (IO (C2HSImp.Ptr (Archive)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_bytes_per_block"
  archiveWriteSetBytesPerBlock'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_get_bytes_per_block"
  archiveWriteGetBytesPerBlock'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_bytes_in_last_block"
  archiveWriteSetBytesInLastBlock'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_get_bytes_in_last_block"
  archiveWriteGetBytesInLastBlock'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_skip_file"
  archiveWriteSetSkipFile'_ :: ((C2HSImp.Ptr (Archive)) -> (LaInt64 -> (LaInt64 -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_add_filter"
  archiveWriteAddFilter'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_add_filter_by_name"
  archiveWriteAddFilterByName'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_add_filter_b64encode"
  archiveWriteAddFilterB64encode'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_add_filter_bzip2"
  archiveWriteAddFilterBzip2'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_add_filter_compress"
  archiveWriteAddFilterCompress'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_add_filter_grzip"
  archiveWriteAddFilterGrzip'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_add_filter_lrzip"
  archiveWriteAddFilterLrzip'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_add_filter_lz4"
  archiveWriteAddFilterLz4'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_add_filter_lzip"
  archiveWriteAddFilterLzip'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_add_filter_lzma"
  archiveWriteAddFilterLzma'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_add_filter_lzop"
  archiveWriteAddFilterLzop'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_add_filter_none"
  archiveWriteAddFilterNone'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_add_filter_program"
  archiveWriteAddFilterProgram'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_add_filter_uuencode"
  archiveWriteAddFilterUuencode'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_add_filter_xz"
  archiveWriteAddFilterXz'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_add_filter_zstd"
  archiveWriteAddFilterZstd'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format"
  archiveWriteSetFormat'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_by_name"
  archiveWriteSetFormatByName'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_7zip"
  archiveWriteSetFormat7zip'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_ar_bsd"
  archiveWriteSetFormatArBsd'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_ar_svr4"
  archiveWriteSetFormatArSvr4'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_cpio"
  archiveWriteSetFormatCpio'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_cpio_newc"
  archiveWriteSetFormatCpioNewc'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_gnutar"
  archiveWriteSetFormatGnutar'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_mtree"
  archiveWriteSetFormatMtree'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_mtree_classic"
  archiveWriteSetFormatMtreeClassic'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_pax"
  archiveWriteSetFormatPax'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_pax_restricted"
  archiveWriteSetFormatPaxRestricted'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_raw"
  archiveWriteSetFormatRaw'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_shar"
  archiveWriteSetFormatShar'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_shar_dump"
  archiveWriteSetFormatSharDump'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_ustar"
  archiveWriteSetFormatUstar'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_v7tar"
  archiveWriteSetFormatV7tar'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_warc"
  archiveWriteSetFormatWarc'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_xar"
  archiveWriteSetFormatXar'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_zip"
  archiveWriteSetFormatZip'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_filter_by_ext"
  archiveWriteSetFormatFilterByExt'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_filter_by_ext_def"
  archiveWriteSetFormatFilterByExtDef'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_zip_set_compression_deflate"
  archiveWriteZipSetCompressionDeflate'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_zip_set_compression_store"
  archiveWriteZipSetCompressionStore'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_open"
  archiveWriteOpen'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (CSize -> (IO LaSSize)))))) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))) -> (IO C2HSImp.CInt))))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_open2"
  archiveWriteOpen2'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr ()) -> (CSize -> (IO LaSSize)))))) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))) -> (IO C2HSImp.CInt)))))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_open_fd"
  archiveWriteOpenFd'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_open_filename"
  archiveWriteOpenFilename'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_open_filename_w"
  archiveWriteOpenFilenameW'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr CWchar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_open_FILE"
  archiveWriteOpenFILE'_ :: ((C2HSImp.Ptr (Archive)) -> ((FilePtr) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_open_memory"
  archiveWriteOpenMemory'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (CSize -> ((C2HSImp.Ptr CSize) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_header"
  archiveWriteHeader'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr (ArchiveEntry)) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_data"
  archiveWriteData'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (CSize -> (IO LaSSize))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_data_block"
  archiveWriteDataBlock'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (CSize -> (LaInt64 -> (IO LaSSize)))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_finish_entry"
  archiveWriteFinishEntry'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_close"
  archiveWriteClose'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_fail"
  archiveWriteFail'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_free"
  archiveWriteFree'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_format_option"
  archiveWriteSetFormatOption'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_filter_option"
  archiveWriteSetFilterOption'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_option"
  archiveWriteSetOption'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_options"
  archiveWriteSetOptions'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_passphrase"
  archiveWriteSetPassphrase'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_set_passphrase_callback"
  archiveWriteSetPassphraseCallback'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> (IO (C2HSImp.Ptr C2HSImp.CChar))))) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_disk_set_options"
  archiveWriteDiskSetOptions'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_disk_new"
  archiveWriteDiskNew'_ :: (IO (C2HSImp.Ptr (Archive)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_disk_set_skip_file"
  archiveWriteDiskSetSkipFile'_ :: ((C2HSImp.Ptr (Archive)) -> (LaInt64 -> (LaInt64 -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_disk_set_standard_lookup"
  archiveWriteDiskSetStandardLookup'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_disk_set_group_lookup"
  archiveWriteDiskSetGroupLookup'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (LaInt64 -> (IO LaInt64))))) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> (IO ()))) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_disk_set_user_lookup"
  archiveWriteDiskSetUserLookup'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (LaInt64 -> (IO LaInt64))))) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> (IO ()))) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_disk_gid"
  archiveWriteDiskGid'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (LaInt64 -> (IO LaInt64))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_write_disk_uid"
  archiveWriteDiskUid'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (LaInt64 -> (IO LaInt64))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_new"
  archiveReadDiskNew'_ :: (IO (C2HSImp.Ptr (Archive)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_set_symlink_logical"
  archiveReadDiskSetSymlinkLogical'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_set_symlink_physical"
  archiveReadDiskSetSymlinkPhysical'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_set_symlink_hybrid"
  archiveReadDiskSetSymlinkHybrid'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_entry_from_file"
  archiveReadDiskEntryFromFile'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr (ArchiveEntry)) -> (C2HSImp.CInt -> ((StatPtr) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_gname"
  archiveReadDiskGname'_ :: ((C2HSImp.Ptr (Archive)) -> (LaInt64 -> (IO (C2HSImp.Ptr C2HSImp.CChar))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_uname"
  archiveReadDiskUname'_ :: ((C2HSImp.Ptr (Archive)) -> (LaInt64 -> (IO (C2HSImp.Ptr C2HSImp.CChar))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_set_standard_lookup"
  archiveReadDiskSetStandardLookup'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_set_gname_lookup"
  archiveReadDiskSetGnameLookup'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> (LaInt64 -> (IO (C2HSImp.Ptr C2HSImp.CChar))))) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> (IO ()))) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_set_uname_lookup"
  archiveReadDiskSetUnameLookup'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> (LaInt64 -> (IO (C2HSImp.Ptr C2HSImp.CChar))))) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr ()) -> (IO ()))) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_open"
  archiveReadDiskOpen'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_open_w"
  archiveReadDiskOpenW'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr CWchar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_descend"
  archiveReadDiskDescend'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_can_descend"
  archiveReadDiskCanDescend'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_current_filesystem"
  archiveReadDiskCurrentFilesystem'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_current_filesystem_is_synthetic"
  archiveReadDiskCurrentFilesystemIsSynthetic'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_current_filesystem_is_remote"
  archiveReadDiskCurrentFilesystemIsRemote'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_set_atime_restored"
  archiveReadDiskSetAtimeRestored'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_set_behavior"
  archiveReadDiskSetBehavior'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_set_matching"
  archiveReadDiskSetMatching'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr (ArchiveEntry)) -> (IO ()))))) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_disk_set_metadata_filter_callback"
  archiveReadDiskSetMetadataFilterCallback'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.FunPtr ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr ()) -> ((C2HSImp.Ptr (ArchiveEntry)) -> (IO C2HSImp.CInt))))) -> ((C2HSImp.Ptr ()) -> (IO C2HSImp.CInt))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_include_gname_w"
  archiveMatchIncludeGnameW'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr CWchar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_include_gname"
  archiveMatchIncludeGname'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_include_uname_w"
  archiveMatchIncludeUnameW'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr CWchar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_include_uname"
  archiveMatchIncludeUname'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_include_gid"
  archiveMatchIncludeGid'_ :: ((C2HSImp.Ptr (Archive)) -> (LaInt64 -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_match_include_uid"
  archiveMatchIncludeUid'_ :: ((C2HSImp.Ptr (Archive)) -> (LaInt64 -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_filter_all"
  archiveReadSupportFilterAll'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_filter_by_code"
  archiveReadSupportFilterByCode'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_filter_bzip2"
  archiveReadSupportFilterBzip2'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_filter_compress"
  archiveReadSupportFilterCompress'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_filter_gzip"
  archiveReadSupportFilterGzip'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_filter_grzip"
  archiveReadSupportFilterGrzip'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_filter_lrzip"
  archiveReadSupportFilterLrzip'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_filter_lz4"
  archiveReadSupportFilterLz4'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_filter_lzip"
  archiveReadSupportFilterLzip'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_filter_lzma"
  archiveReadSupportFilterLzma'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_filter_lzop"
  archiveReadSupportFilterLzop'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_filter_none"
  archiveReadSupportFilterNone'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_filter_program"
  archiveReadSupportFilterProgram'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_filter_program_signature"
  archiveReadSupportFilterProgramSignature'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr ()) -> (CSize -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_filter_rpm"
  archiveReadSupportFilterRpm'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_filter_uu"
  archiveReadSupportFilterUu'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_filter_xz"
  archiveReadSupportFilterXz'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_7zip"
  archiveReadSupportFormat7zip'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_all"
  archiveReadSupportFormatAll'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_ar"
  archiveReadSupportFormatAr'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_by_code"
  archiveReadSupportFormatByCode'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_cab"
  archiveReadSupportFormatCab'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_cpio"
  archiveReadSupportFormatCpio'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_empty"
  archiveReadSupportFormatEmpty'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_gnutar"
  archiveReadSupportFormatGnutar'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_iso9660"
  archiveReadSupportFormatIso9660'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_lha"
  archiveReadSupportFormatLha'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_mtree"
  archiveReadSupportFormatMtree'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_rar"
  archiveReadSupportFormatRar'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_rar5"
  archiveReadSupportFormatRar5'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_raw"
  archiveReadSupportFormatRaw'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_tar"
  archiveReadSupportFormatTar'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_warc"
  archiveReadSupportFormatWarc'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_xar"
  archiveReadSupportFormatXar'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_zip"
  archiveReadSupportFormatZip'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_zip_streamable"
  archiveReadSupportFormatZipStreamable'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_support_format_zip_seekable"
  archiveReadSupportFormatZipSeekable'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_set_format"
  archiveReadSetFormat'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_append_filter"
  archiveReadAppendFilter'_ :: ((C2HSImp.Ptr (Archive)) -> (C2HSImp.CInt -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_append_filter_program"
  archiveReadAppendFilterProgram'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> (IO C2HSImp.CInt)))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_read_append_filter_program_signature"
  archiveReadAppendFilterProgramSignature'_ :: ((C2HSImp.Ptr (Archive)) -> ((C2HSImp.Ptr C2HSImp.CChar) -> ((C2HSImp.Ptr ()) -> (CSize -> (IO C2HSImp.CInt)))))

foreign import ccall safe "Codec/Archive/Foreign/Archive.chs.h archive_errno"
  archiveErrno'_ :: ((C2HSImp.Ptr (Archive)) -> (IO C2HSImp.CInt))