/* auto-generated, do not modify */
#include "config.h"

#include "fu-archive-struct.h"
#include "fu-byte-array.h"
#include "fu-mem-private.h"
#include "fu-string.h"

#ifdef G_LOG_DOMAIN
  #undef G_LOG_DOMAIN
#endif
#define G_LOG_DOMAIN "FuStruct"

const gchar *
fu_archive_format_to_string(FuArchiveFormat val)
{
    if (val == FU_ARCHIVE_FORMAT_UNKNOWN)
        return "unknown";
    if (val == FU_ARCHIVE_FORMAT_CPIO)
        return "cpio";
    if (val == FU_ARCHIVE_FORMAT_SHAR)
        return "shar";
    if (val == FU_ARCHIVE_FORMAT_TAR)
        return "tar";
    if (val == FU_ARCHIVE_FORMAT_USTAR)
        return "ustar";
    if (val == FU_ARCHIVE_FORMAT_PAX)
        return "pax";
    if (val == FU_ARCHIVE_FORMAT_GNUTAR)
        return "gnutar";
    if (val == FU_ARCHIVE_FORMAT_ISO9660)
        return "iso9660";
    if (val == FU_ARCHIVE_FORMAT_ZIP)
        return "zip";
    if (val == FU_ARCHIVE_FORMAT_AR)
        return "ar";
    if (val == FU_ARCHIVE_FORMAT_AR_SVR4)
        return "ar-svr4";
    if (val == FU_ARCHIVE_FORMAT_MTREE)
        return "mtree";
    if (val == FU_ARCHIVE_FORMAT_RAW)
        return "raw";
    if (val == FU_ARCHIVE_FORMAT_XAR)
        return "xar";
    if (val == FU_ARCHIVE_FORMAT_7ZIP)
        return "7zip";
    if (val == FU_ARCHIVE_FORMAT_WARC)
        return "warc";
    return NULL;
}
FuArchiveFormat
fu_archive_format_from_string(const gchar *val)
{
    if (g_strcmp0(val, "unknown") == 0)
        return FU_ARCHIVE_FORMAT_UNKNOWN;
    if (g_strcmp0(val, "cpio") == 0)
        return FU_ARCHIVE_FORMAT_CPIO;
    if (g_strcmp0(val, "shar") == 0)
        return FU_ARCHIVE_FORMAT_SHAR;
    if (g_strcmp0(val, "tar") == 0)
        return FU_ARCHIVE_FORMAT_TAR;
    if (g_strcmp0(val, "ustar") == 0)
        return FU_ARCHIVE_FORMAT_USTAR;
    if (g_strcmp0(val, "pax") == 0)
        return FU_ARCHIVE_FORMAT_PAX;
    if (g_strcmp0(val, "gnutar") == 0)
        return FU_ARCHIVE_FORMAT_GNUTAR;
    if (g_strcmp0(val, "iso9660") == 0)
        return FU_ARCHIVE_FORMAT_ISO9660;
    if (g_strcmp0(val, "zip") == 0)
        return FU_ARCHIVE_FORMAT_ZIP;
    if (g_strcmp0(val, "ar") == 0)
        return FU_ARCHIVE_FORMAT_AR;
    if (g_strcmp0(val, "ar-svr4") == 0)
        return FU_ARCHIVE_FORMAT_AR_SVR4;
    if (g_strcmp0(val, "mtree") == 0)
        return FU_ARCHIVE_FORMAT_MTREE;
    if (g_strcmp0(val, "raw") == 0)
        return FU_ARCHIVE_FORMAT_RAW;
    if (g_strcmp0(val, "xar") == 0)
        return FU_ARCHIVE_FORMAT_XAR;
    if (g_strcmp0(val, "7zip") == 0)
        return FU_ARCHIVE_FORMAT_7ZIP;
    if (g_strcmp0(val, "warc") == 0)
        return FU_ARCHIVE_FORMAT_WARC;
    return FU_ARCHIVE_FORMAT_UNKNOWN;
}

const gchar *
fu_archive_compression_to_string(FuArchiveCompression val)
{
    if (val == FU_ARCHIVE_COMPRESSION_UNKNOWN)
        return "unknown";
    if (val == FU_ARCHIVE_COMPRESSION_NONE)
        return "none";
    if (val == FU_ARCHIVE_COMPRESSION_GZIP)
        return "gzip";
    if (val == FU_ARCHIVE_COMPRESSION_BZIP2)
        return "bzip2";
    if (val == FU_ARCHIVE_COMPRESSION_COMPRESS)
        return "compress";
    if (val == FU_ARCHIVE_COMPRESSION_LZMA)
        return "lzma";
    if (val == FU_ARCHIVE_COMPRESSION_XZ)
        return "xz";
    if (val == FU_ARCHIVE_COMPRESSION_UU)
        return "uu";
    if (val == FU_ARCHIVE_COMPRESSION_LZIP)
        return "lzip";
    if (val == FU_ARCHIVE_COMPRESSION_LRZIP)
        return "lrzip";
    if (val == FU_ARCHIVE_COMPRESSION_LZOP)
        return "lzop";
    if (val == FU_ARCHIVE_COMPRESSION_GRZIP)
        return "grzip";
    if (val == FU_ARCHIVE_COMPRESSION_LZ4)
        return "lz4";
    if (val == FU_ARCHIVE_COMPRESSION_ZSTD)
        return "zstd";
    return NULL;
}
FuArchiveCompression
fu_archive_compression_from_string(const gchar *val)
{
    if (g_strcmp0(val, "unknown") == 0)
        return FU_ARCHIVE_COMPRESSION_UNKNOWN;
    if (g_strcmp0(val, "none") == 0)
        return FU_ARCHIVE_COMPRESSION_NONE;
    if (g_strcmp0(val, "gzip") == 0)
        return FU_ARCHIVE_COMPRESSION_GZIP;
    if (g_strcmp0(val, "bzip2") == 0)
        return FU_ARCHIVE_COMPRESSION_BZIP2;
    if (g_strcmp0(val, "compress") == 0)
        return FU_ARCHIVE_COMPRESSION_COMPRESS;
    if (g_strcmp0(val, "lzma") == 0)
        return FU_ARCHIVE_COMPRESSION_LZMA;
    if (g_strcmp0(val, "xz") == 0)
        return FU_ARCHIVE_COMPRESSION_XZ;
    if (g_strcmp0(val, "uu") == 0)
        return FU_ARCHIVE_COMPRESSION_UU;
    if (g_strcmp0(val, "lzip") == 0)
        return FU_ARCHIVE_COMPRESSION_LZIP;
    if (g_strcmp0(val, "lrzip") == 0)
        return FU_ARCHIVE_COMPRESSION_LRZIP;
    if (g_strcmp0(val, "lzop") == 0)
        return FU_ARCHIVE_COMPRESSION_LZOP;
    if (g_strcmp0(val, "grzip") == 0)
        return FU_ARCHIVE_COMPRESSION_GRZIP;
    if (g_strcmp0(val, "lz4") == 0)
        return FU_ARCHIVE_COMPRESSION_LZ4;
    if (g_strcmp0(val, "zstd") == 0)
        return FU_ARCHIVE_COMPRESSION_ZSTD;
    return FU_ARCHIVE_COMPRESSION_UNKNOWN;
}
