// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#ifndef RCPP_qs_RCPPEXPORTS_H_GEN_
#define RCPP_qs_RCPPEXPORTS_H_GEN_

#include <Rcpp.h>

namespace qs {

    using namespace Rcpp;

    namespace {
        void validateSignature(const char* sig) {
            Rcpp::Function require = Rcpp::Environment::base_env()["require"];
            require("qs", Rcpp::Named("quietly") = true);
            typedef int(*Ptr_validate)(const char*);
            static Ptr_validate p_validate = (Ptr_validate)
                R_GetCCallable("qs", "_qs_RcppExport_validate");
            if (!p_validate(sig)) {
                throw Rcpp::function_not_exported(
                    "C++ function with signature '" + std::string(sig) + "' not found in qs");
            }
        }
    }

    inline std::vector<std::string> randomStrings(const int N, const int string_size = 50) {
        typedef SEXP(*Ptr_randomStrings)(SEXP,SEXP);
        static Ptr_randomStrings p_randomStrings = NULL;
        if (p_randomStrings == NULL) {
            validateSignature("std::vector<std::string>(*randomStrings)(const int,const int)");
            p_randomStrings = (Ptr_randomStrings)R_GetCCallable("qs", "_qs_randomStrings");
        }
        RObject rcpp_result_gen;
        {
            RNGScope RCPP_rngScope_gen;
            rcpp_result_gen = p_randomStrings(Shield<SEXP>(Rcpp::wrap(N)), Shield<SEXP>(Rcpp::wrap(string_size)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<std::vector<std::string> >(rcpp_result_gen);
    }

    inline int zstd_compress_bound(const int size) {
        typedef SEXP(*Ptr_zstd_compress_bound)(SEXP);
        static Ptr_zstd_compress_bound p_zstd_compress_bound = NULL;
        if (p_zstd_compress_bound == NULL) {
            validateSignature("int(*zstd_compress_bound)(const int)");
            p_zstd_compress_bound = (Ptr_zstd_compress_bound)R_GetCCallable("qs", "_qs_zstd_compress_bound");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_zstd_compress_bound(Shield<SEXP>(Rcpp::wrap(size)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<int >(rcpp_result_gen);
    }

    inline int lz4_compress_bound(const int size) {
        typedef SEXP(*Ptr_lz4_compress_bound)(SEXP);
        static Ptr_lz4_compress_bound p_lz4_compress_bound = NULL;
        if (p_lz4_compress_bound == NULL) {
            validateSignature("int(*lz4_compress_bound)(const int)");
            p_lz4_compress_bound = (Ptr_lz4_compress_bound)R_GetCCallable("qs", "_qs_lz4_compress_bound");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_lz4_compress_bound(Shield<SEXP>(Rcpp::wrap(size)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<int >(rcpp_result_gen);
    }

    inline std::vector<unsigned char> zstd_compress_raw(SEXP const x, const int compress_level) {
        typedef SEXP(*Ptr_zstd_compress_raw)(SEXP,SEXP);
        static Ptr_zstd_compress_raw p_zstd_compress_raw = NULL;
        if (p_zstd_compress_raw == NULL) {
            validateSignature("std::vector<unsigned char>(*zstd_compress_raw)(SEXP const,const int)");
            p_zstd_compress_raw = (Ptr_zstd_compress_raw)R_GetCCallable("qs", "_qs_zstd_compress_raw");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_zstd_compress_raw(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(compress_level)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<std::vector<unsigned char> >(rcpp_result_gen);
    }

    inline RawVector zstd_decompress_raw(SEXP const x) {
        typedef SEXP(*Ptr_zstd_decompress_raw)(SEXP);
        static Ptr_zstd_decompress_raw p_zstd_decompress_raw = NULL;
        if (p_zstd_decompress_raw == NULL) {
            validateSignature("RawVector(*zstd_decompress_raw)(SEXP const)");
            p_zstd_decompress_raw = (Ptr_zstd_decompress_raw)R_GetCCallable("qs", "_qs_zstd_decompress_raw");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_zstd_decompress_raw(Shield<SEXP>(Rcpp::wrap(x)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<RawVector >(rcpp_result_gen);
    }

    inline std::vector<unsigned char> lz4_compress_raw(SEXP const x, const int compress_level) {
        typedef SEXP(*Ptr_lz4_compress_raw)(SEXP,SEXP);
        static Ptr_lz4_compress_raw p_lz4_compress_raw = NULL;
        if (p_lz4_compress_raw == NULL) {
            validateSignature("std::vector<unsigned char>(*lz4_compress_raw)(SEXP const,const int)");
            p_lz4_compress_raw = (Ptr_lz4_compress_raw)R_GetCCallable("qs", "_qs_lz4_compress_raw");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_lz4_compress_raw(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(compress_level)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<std::vector<unsigned char> >(rcpp_result_gen);
    }

    inline std::vector<unsigned char> lz4_decompress_raw(SEXP const x) {
        typedef SEXP(*Ptr_lz4_decompress_raw)(SEXP);
        static Ptr_lz4_decompress_raw p_lz4_decompress_raw = NULL;
        if (p_lz4_decompress_raw == NULL) {
            validateSignature("std::vector<unsigned char>(*lz4_decompress_raw)(SEXP const)");
            p_lz4_decompress_raw = (Ptr_lz4_decompress_raw)R_GetCCallable("qs", "_qs_lz4_decompress_raw");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_lz4_decompress_raw(Shield<SEXP>(Rcpp::wrap(x)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<std::vector<unsigned char> >(rcpp_result_gen);
    }

    inline std::vector<unsigned char> blosc_shuffle_raw(SEXP const x, int bytesofsize) {
        typedef SEXP(*Ptr_blosc_shuffle_raw)(SEXP,SEXP);
        static Ptr_blosc_shuffle_raw p_blosc_shuffle_raw = NULL;
        if (p_blosc_shuffle_raw == NULL) {
            validateSignature("std::vector<unsigned char>(*blosc_shuffle_raw)(SEXP const,int)");
            p_blosc_shuffle_raw = (Ptr_blosc_shuffle_raw)R_GetCCallable("qs", "_qs_blosc_shuffle_raw");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_blosc_shuffle_raw(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(bytesofsize)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<std::vector<unsigned char> >(rcpp_result_gen);
    }

    inline std::vector<unsigned char> blosc_unshuffle_raw(SEXP const x, int bytesofsize) {
        typedef SEXP(*Ptr_blosc_unshuffle_raw)(SEXP,SEXP);
        static Ptr_blosc_unshuffle_raw p_blosc_unshuffle_raw = NULL;
        if (p_blosc_unshuffle_raw == NULL) {
            validateSignature("std::vector<unsigned char>(*blosc_unshuffle_raw)(SEXP const,int)");
            p_blosc_unshuffle_raw = (Ptr_blosc_unshuffle_raw)R_GetCCallable("qs", "_qs_blosc_unshuffle_raw");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_blosc_unshuffle_raw(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(bytesofsize)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<std::vector<unsigned char> >(rcpp_result_gen);
    }

    inline std::string xxhash_raw(SEXP const x) {
        typedef SEXP(*Ptr_xxhash_raw)(SEXP);
        static Ptr_xxhash_raw p_xxhash_raw = NULL;
        if (p_xxhash_raw == NULL) {
            validateSignature("std::string(*xxhash_raw)(SEXP const)");
            p_xxhash_raw = (Ptr_xxhash_raw)R_GetCCallable("qs", "_qs_xxhash_raw");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_xxhash_raw(Shield<SEXP>(Rcpp::wrap(x)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<std::string >(rcpp_result_gen);
    }

    inline SEXP convertToAlt(const CharacterVector& x) {
        typedef SEXP(*Ptr_convertToAlt)(SEXP);
        static Ptr_convertToAlt p_convertToAlt = NULL;
        if (p_convertToAlt == NULL) {
            validateSignature("SEXP(*convertToAlt)(const CharacterVector&)");
            p_convertToAlt = (Ptr_convertToAlt)R_GetCCallable("qs", "_qs_convertToAlt");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_convertToAlt(Shield<SEXP>(Rcpp::wrap(x)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline std::string base85_encode(const RawVector& rawdata) {
        typedef SEXP(*Ptr_base85_encode)(SEXP);
        static Ptr_base85_encode p_base85_encode = NULL;
        if (p_base85_encode == NULL) {
            validateSignature("std::string(*base85_encode)(const RawVector&)");
            p_base85_encode = (Ptr_base85_encode)R_GetCCallable("qs", "_qs_base85_encode");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_base85_encode(Shield<SEXP>(Rcpp::wrap(rawdata)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<std::string >(rcpp_result_gen);
    }

    inline RawVector base85_decode(const std::string& encoded_string) {
        typedef SEXP(*Ptr_base85_decode)(SEXP);
        static Ptr_base85_decode p_base85_decode = NULL;
        if (p_base85_decode == NULL) {
            validateSignature("RawVector(*base85_decode)(const std::string&)");
            p_base85_decode = (Ptr_base85_decode)R_GetCCallable("qs", "_qs_base85_decode");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_base85_decode(Shield<SEXP>(Rcpp::wrap(encoded_string)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<RawVector >(rcpp_result_gen);
    }

    inline std::string base91_encode(const RawVector& rawdata) {
        typedef SEXP(*Ptr_base91_encode)(SEXP);
        static Ptr_base91_encode p_base91_encode = NULL;
        if (p_base91_encode == NULL) {
            validateSignature("std::string(*base91_encode)(const RawVector&)");
            p_base91_encode = (Ptr_base91_encode)R_GetCCallable("qs", "_qs_base91_encode");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_base91_encode(Shield<SEXP>(Rcpp::wrap(rawdata)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<std::string >(rcpp_result_gen);
    }

    inline RawVector base91_decode(const std::string& encoded_string) {
        typedef SEXP(*Ptr_base91_decode)(SEXP);
        static Ptr_base91_decode p_base91_decode = NULL;
        if (p_base91_decode == NULL) {
            validateSignature("RawVector(*base91_decode)(const std::string&)");
            p_base91_decode = (Ptr_base91_decode)R_GetCCallable("qs", "_qs_base91_decode");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_base91_decode(Shield<SEXP>(Rcpp::wrap(encoded_string)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<RawVector >(rcpp_result_gen);
    }

    inline bool is_big_endian() {
        typedef SEXP(*Ptr_is_big_endian)();
        static Ptr_is_big_endian p_is_big_endian = NULL;
        if (p_is_big_endian == NULL) {
            validateSignature("bool(*is_big_endian)()");
            p_is_big_endian = (Ptr_is_big_endian)R_GetCCallable("qs", "_qs_is_big_endian");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_is_big_endian();
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<bool >(rcpp_result_gen);
    }

    inline double c_qsave(SEXP const x, const std::string& file, const std::string& preset, const std::string& algorithm, const int compress_level, const int shuffle_control, const bool check_hash, const int nthreads) {
        typedef SEXP(*Ptr_c_qsave)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_c_qsave p_c_qsave = NULL;
        if (p_c_qsave == NULL) {
            validateSignature("double(*c_qsave)(SEXP const,const std::string&,const std::string&,const std::string&,const int,const int,const bool,const int)");
            p_c_qsave = (Ptr_c_qsave)R_GetCCallable("qs", "_qs_c_qsave");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_c_qsave(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(file)), Shield<SEXP>(Rcpp::wrap(preset)), Shield<SEXP>(Rcpp::wrap(algorithm)), Shield<SEXP>(Rcpp::wrap(compress_level)), Shield<SEXP>(Rcpp::wrap(shuffle_control)), Shield<SEXP>(Rcpp::wrap(check_hash)), Shield<SEXP>(Rcpp::wrap(nthreads)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline double c_qsave_fd(SEXP const x, const int fd, const std::string& preset, const std::string& algorithm, const int compress_level, const int shuffle_control, const bool check_hash) {
        typedef SEXP(*Ptr_c_qsave_fd)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_c_qsave_fd p_c_qsave_fd = NULL;
        if (p_c_qsave_fd == NULL) {
            validateSignature("double(*c_qsave_fd)(SEXP const,const int,const std::string&,const std::string&,const int,const int,const bool)");
            p_c_qsave_fd = (Ptr_c_qsave_fd)R_GetCCallable("qs", "_qs_c_qsave_fd");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_c_qsave_fd(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(fd)), Shield<SEXP>(Rcpp::wrap(preset)), Shield<SEXP>(Rcpp::wrap(algorithm)), Shield<SEXP>(Rcpp::wrap(compress_level)), Shield<SEXP>(Rcpp::wrap(shuffle_control)), Shield<SEXP>(Rcpp::wrap(check_hash)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline double c_qsave_handle(SEXP const x, SEXP const handle, const std::string& preset, const std::string& algorithm, const int compress_level, const int shuffle_control, const bool check_hash) {
        typedef SEXP(*Ptr_c_qsave_handle)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_c_qsave_handle p_c_qsave_handle = NULL;
        if (p_c_qsave_handle == NULL) {
            validateSignature("double(*c_qsave_handle)(SEXP const,SEXP const,const std::string&,const std::string&,const int,const int,const bool)");
            p_c_qsave_handle = (Ptr_c_qsave_handle)R_GetCCallable("qs", "_qs_c_qsave_handle");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_c_qsave_handle(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(handle)), Shield<SEXP>(Rcpp::wrap(preset)), Shield<SEXP>(Rcpp::wrap(algorithm)), Shield<SEXP>(Rcpp::wrap(compress_level)), Shield<SEXP>(Rcpp::wrap(shuffle_control)), Shield<SEXP>(Rcpp::wrap(check_hash)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<double >(rcpp_result_gen);
    }

    inline RawVector c_qserialize(SEXP const x, const std::string& preset, const std::string& algorithm, const int compress_level, const int shuffle_control, const bool check_hash) {
        typedef SEXP(*Ptr_c_qserialize)(SEXP,SEXP,SEXP,SEXP,SEXP,SEXP);
        static Ptr_c_qserialize p_c_qserialize = NULL;
        if (p_c_qserialize == NULL) {
            validateSignature("RawVector(*c_qserialize)(SEXP const,const std::string&,const std::string&,const int,const int,const bool)");
            p_c_qserialize = (Ptr_c_qserialize)R_GetCCallable("qs", "_qs_c_qserialize");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_c_qserialize(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(preset)), Shield<SEXP>(Rcpp::wrap(algorithm)), Shield<SEXP>(Rcpp::wrap(compress_level)), Shield<SEXP>(Rcpp::wrap(shuffle_control)), Shield<SEXP>(Rcpp::wrap(check_hash)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<RawVector >(rcpp_result_gen);
    }

    inline SEXP c_qread(const std::string& file, const bool use_alt_rep, const bool strict, const int nthreads) {
        typedef SEXP(*Ptr_c_qread)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_c_qread p_c_qread = NULL;
        if (p_c_qread == NULL) {
            validateSignature("SEXP(*c_qread)(const std::string&,const bool,const bool,const int)");
            p_c_qread = (Ptr_c_qread)R_GetCCallable("qs", "_qs_c_qread");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_c_qread(Shield<SEXP>(Rcpp::wrap(file)), Shield<SEXP>(Rcpp::wrap(use_alt_rep)), Shield<SEXP>(Rcpp::wrap(strict)), Shield<SEXP>(Rcpp::wrap(nthreads)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline SEXP c_qread_fd(const int fd, const bool use_alt_rep, const bool strict) {
        typedef SEXP(*Ptr_c_qread_fd)(SEXP,SEXP,SEXP);
        static Ptr_c_qread_fd p_c_qread_fd = NULL;
        if (p_c_qread_fd == NULL) {
            validateSignature("SEXP(*c_qread_fd)(const int,const bool,const bool)");
            p_c_qread_fd = (Ptr_c_qread_fd)R_GetCCallable("qs", "_qs_c_qread_fd");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_c_qread_fd(Shield<SEXP>(Rcpp::wrap(fd)), Shield<SEXP>(Rcpp::wrap(use_alt_rep)), Shield<SEXP>(Rcpp::wrap(strict)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline SEXP c_qread_handle(SEXP const handle, const bool use_alt_rep, const bool strict) {
        typedef SEXP(*Ptr_c_qread_handle)(SEXP,SEXP,SEXP);
        static Ptr_c_qread_handle p_c_qread_handle = NULL;
        if (p_c_qread_handle == NULL) {
            validateSignature("SEXP(*c_qread_handle)(SEXP const,const bool,const bool)");
            p_c_qread_handle = (Ptr_c_qread_handle)R_GetCCallable("qs", "_qs_c_qread_handle");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_c_qread_handle(Shield<SEXP>(Rcpp::wrap(handle)), Shield<SEXP>(Rcpp::wrap(use_alt_rep)), Shield<SEXP>(Rcpp::wrap(strict)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline SEXP c_qread_ptr(SEXP const pointer, const double length, const bool use_alt_rep, const bool strict) {
        typedef SEXP(*Ptr_c_qread_ptr)(SEXP,SEXP,SEXP,SEXP);
        static Ptr_c_qread_ptr p_c_qread_ptr = NULL;
        if (p_c_qread_ptr == NULL) {
            validateSignature("SEXP(*c_qread_ptr)(SEXP const,const double,const bool,const bool)");
            p_c_qread_ptr = (Ptr_c_qread_ptr)R_GetCCallable("qs", "_qs_c_qread_ptr");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_c_qread_ptr(Shield<SEXP>(Rcpp::wrap(pointer)), Shield<SEXP>(Rcpp::wrap(length)), Shield<SEXP>(Rcpp::wrap(use_alt_rep)), Shield<SEXP>(Rcpp::wrap(strict)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline SEXP c_qdeserialize(SEXP const x, const bool use_alt_rep, const bool strict) {
        typedef SEXP(*Ptr_c_qdeserialize)(SEXP,SEXP,SEXP);
        static Ptr_c_qdeserialize p_c_qdeserialize = NULL;
        if (p_c_qdeserialize == NULL) {
            validateSignature("SEXP(*c_qdeserialize)(SEXP const,const bool,const bool)");
            p_c_qdeserialize = (Ptr_c_qdeserialize)R_GetCCallable("qs", "_qs_c_qdeserialize");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_c_qdeserialize(Shield<SEXP>(Rcpp::wrap(x)), Shield<SEXP>(Rcpp::wrap(use_alt_rep)), Shield<SEXP>(Rcpp::wrap(strict)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline RObject c_qdump(const std::string& file) {
        typedef SEXP(*Ptr_c_qdump)(SEXP);
        static Ptr_c_qdump p_c_qdump = NULL;
        if (p_c_qdump == NULL) {
            validateSignature("RObject(*c_qdump)(const std::string&)");
            p_c_qdump = (Ptr_c_qdump)R_GetCCallable("qs", "_qs_c_qdump");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_c_qdump(Shield<SEXP>(Rcpp::wrap(file)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<RObject >(rcpp_result_gen);
    }

    inline int openFd(const std::string& file, const std::string& mode) {
        typedef SEXP(*Ptr_openFd)(SEXP,SEXP);
        static Ptr_openFd p_openFd = NULL;
        if (p_openFd == NULL) {
            validateSignature("int(*openFd)(const std::string&,const std::string&)");
            p_openFd = (Ptr_openFd)R_GetCCallable("qs", "_qs_openFd");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_openFd(Shield<SEXP>(Rcpp::wrap(file)), Shield<SEXP>(Rcpp::wrap(mode)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<int >(rcpp_result_gen);
    }

    inline SEXP readFdDirect(const int fd, const int n_bytes) {
        typedef SEXP(*Ptr_readFdDirect)(SEXP,SEXP);
        static Ptr_readFdDirect p_readFdDirect = NULL;
        if (p_readFdDirect == NULL) {
            validateSignature("SEXP(*readFdDirect)(const int,const int)");
            p_readFdDirect = (Ptr_readFdDirect)R_GetCCallable("qs", "_qs_readFdDirect");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_readFdDirect(Shield<SEXP>(Rcpp::wrap(fd)), Shield<SEXP>(Rcpp::wrap(n_bytes)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline int closeFd(const int fd) {
        typedef SEXP(*Ptr_closeFd)(SEXP);
        static Ptr_closeFd p_closeFd = NULL;
        if (p_closeFd == NULL) {
            validateSignature("int(*closeFd)(const int)");
            p_closeFd = (Ptr_closeFd)R_GetCCallable("qs", "_qs_closeFd");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_closeFd(Shield<SEXP>(Rcpp::wrap(fd)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<int >(rcpp_result_gen);
    }

    inline SEXP openMmap(const int fd, const double length) {
        typedef SEXP(*Ptr_openMmap)(SEXP,SEXP);
        static Ptr_openMmap p_openMmap = NULL;
        if (p_openMmap == NULL) {
            validateSignature("SEXP(*openMmap)(const int,const double)");
            p_openMmap = (Ptr_openMmap)R_GetCCallable("qs", "_qs_openMmap");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_openMmap(Shield<SEXP>(Rcpp::wrap(fd)), Shield<SEXP>(Rcpp::wrap(length)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline int closeMmap(SEXP const map, const double length) {
        typedef SEXP(*Ptr_closeMmap)(SEXP,SEXP);
        static Ptr_closeMmap p_closeMmap = NULL;
        if (p_closeMmap == NULL) {
            validateSignature("int(*closeMmap)(SEXP const,const double)");
            p_closeMmap = (Ptr_closeMmap)R_GetCCallable("qs", "_qs_closeMmap");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_closeMmap(Shield<SEXP>(Rcpp::wrap(map)), Shield<SEXP>(Rcpp::wrap(length)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<int >(rcpp_result_gen);
    }

    inline SEXP openHandle(const std::string& file, const std::string& mode) {
        typedef SEXP(*Ptr_openHandle)(SEXP,SEXP);
        static Ptr_openHandle p_openHandle = NULL;
        if (p_openHandle == NULL) {
            validateSignature("SEXP(*openHandle)(const std::string&,const std::string&)");
            p_openHandle = (Ptr_openHandle)R_GetCCallable("qs", "_qs_openHandle");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_openHandle(Shield<SEXP>(Rcpp::wrap(file)), Shield<SEXP>(Rcpp::wrap(mode)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline bool closeHandle(SEXP const handle) {
        typedef SEXP(*Ptr_closeHandle)(SEXP);
        static Ptr_closeHandle p_closeHandle = NULL;
        if (p_closeHandle == NULL) {
            validateSignature("bool(*closeHandle)(SEXP const)");
            p_closeHandle = (Ptr_closeHandle)R_GetCCallable("qs", "_qs_closeHandle");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_closeHandle(Shield<SEXP>(Rcpp::wrap(handle)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<bool >(rcpp_result_gen);
    }

    inline SEXP openWinFileMapping(SEXP const handle, const double length) {
        typedef SEXP(*Ptr_openWinFileMapping)(SEXP,SEXP);
        static Ptr_openWinFileMapping p_openWinFileMapping = NULL;
        if (p_openWinFileMapping == NULL) {
            validateSignature("SEXP(*openWinFileMapping)(SEXP const,const double)");
            p_openWinFileMapping = (Ptr_openWinFileMapping)R_GetCCallable("qs", "_qs_openWinFileMapping");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_openWinFileMapping(Shield<SEXP>(Rcpp::wrap(handle)), Shield<SEXP>(Rcpp::wrap(length)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline SEXP openWinMapView(SEXP const handle, const double length) {
        typedef SEXP(*Ptr_openWinMapView)(SEXP,SEXP);
        static Ptr_openWinMapView p_openWinMapView = NULL;
        if (p_openWinMapView == NULL) {
            validateSignature("SEXP(*openWinMapView)(SEXP const,const double)");
            p_openWinMapView = (Ptr_openWinMapView)R_GetCCallable("qs", "_qs_openWinMapView");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_openWinMapView(Shield<SEXP>(Rcpp::wrap(handle)), Shield<SEXP>(Rcpp::wrap(length)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<SEXP >(rcpp_result_gen);
    }

    inline bool closeWinMapView(SEXP const pointer) {
        typedef SEXP(*Ptr_closeWinMapView)(SEXP);
        static Ptr_closeWinMapView p_closeWinMapView = NULL;
        if (p_closeWinMapView == NULL) {
            validateSignature("bool(*closeWinMapView)(SEXP const)");
            p_closeWinMapView = (Ptr_closeWinMapView)R_GetCCallable("qs", "_qs_closeWinMapView");
        }
        RObject rcpp_result_gen;
        {
            rcpp_result_gen = p_closeWinMapView(Shield<SEXP>(Rcpp::wrap(pointer)));
        }
        if (rcpp_result_gen.inherits("interrupted-error"))
            throw Rcpp::internal::InterruptedException();
        if (Rcpp::internal::isLongjumpSentinel(rcpp_result_gen))
            throw Rcpp::LongjumpException(rcpp_result_gen);
        if (rcpp_result_gen.inherits("try-error"))
            throw Rcpp::exception(Rcpp::as<std::string>(rcpp_result_gen).c_str());
        return Rcpp::as<bool >(rcpp_result_gen);
    }

}

#endif // RCPP_qs_RCPPEXPORTS_H_GEN_
