{
    "content": [
        {
            "type": "text",
            "text": "# Dpkg::Compression (perldoc)\n\n## NAME\n\nDpkg::Compression - simple database of available compression methods\n\n## DESCRIPTION\n\nThis modules provides a few public functions and a public regex to interact with the set of\nsupported compression methods.\n\n## Sections\n\n- **NAME**\n- **DESCRIPTION**\n- **FUNCTIONS** (6 subsections)\n- **CHANGES**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Dpkg::Compression",
        "section": "",
        "mode": "perldoc",
        "summary": "Dpkg::Compression - simple database of available compression methods",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "FUNCTIONS",
                "lines": 3,
                "subsections": [
                    {
                        "name": "compression_is_supported",
                        "lines": 2
                    },
                    {
                        "name": "compression_get_property",
                        "lines": 6
                    },
                    {
                        "name": "compression_guess_from_filename",
                        "lines": 11
                    },
                    {
                        "name": "compression_set_default",
                        "lines": 8
                    },
                    {
                        "name": "compression_set_default_level",
                        "lines": 4
                    },
                    {
                        "name": "compression_is_valid_level",
                        "lines": 3
                    }
                ]
            },
            {
                "name": "CHANGES",
                "lines": 15,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Dpkg::Compression - simple database of available compression methods\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This modules provides a few public functions and a public regex to interact with the set of\nsupported compression methods.\n",
                "subsections": []
            },
            "FUNCTIONS": {
                "content": "@list = compressiongetlist()\nReturns a list of supported compression methods (sorted alphabetically).\n",
                "subsections": [
                    {
                        "name": "compression_is_supported",
                        "content": "Returns a boolean indicating whether the give compression method is known and supported.\n"
                    },
                    {
                        "name": "compression_get_property",
                        "content": "Returns the requested property of the compression method. Returns undef if either the\nproperty or the compression method doesn't exist. Valid properties currently include\n\"fileext\" for the file extension, \"defaultlevel\" for the default compression level,\n\"compprog\" for the name of the compression program and \"decompprog\" for the name of the\ndecompression program.\n"
                    },
                    {
                        "name": "compression_guess_from_filename",
                        "content": "Returns the compression method that is likely used on the indicated filename based on its\nfile extension.\n\n$regex = compressiongetfileextensionregex()\nReturns a regex that matches a file extension of a file compressed with one of the supported\ncompression methods.\n\n$comp = compressiongetdefault()\nReturn the default compression method. It is \"xz\" unless \"compressionsetdefault\" has been\nused to change it.\n"
                    },
                    {
                        "name": "compression_set_default",
                        "content": "Change the default compression method. Errors out if the given compression method is not\nsupported.\n\n$level = compressiongetdefaultlevel()\nReturn the default compression level used when compressing data. It's \"9\" for \"gzip\" and\n\"bzip2\", \"6\" for \"xz\" and \"lzma\", unless \"compressionsetdefaultlevel\" has been used to\nchange it.\n"
                    },
                    {
                        "name": "compression_set_default_level",
                        "content": "Change the default compression level. Passing undef as the level will reset it to the\ncompressor specific default, otherwise errors out if the level is not valid (see\n\"compressionisvalidlevel\").\n"
                    },
                    {
                        "name": "compression_is_valid_level",
                        "content": "Returns a boolean indicating whether $level is a valid compression level (it must be either\na number between 1 and 9 or \"fast\" or \"best\")\n"
                    }
                ]
            },
            "CHANGES": {
                "content": "Version 2.00 (dpkg 1.20.0)\nHide variables: $defaultcompression, $defaultcompressionlevel and $compressionrefileext.\n\nVersion 1.02 (dpkg 1.17.2)\nNew function: compressiongetfileextensionregex()\n\nDeprecated variables: $defaultcompression, $defaultcompressionlevel and\n$compressionrefileext\n\nVersion 1.01 (dpkg 1.16.1)\nDefault compression level is not global any more, it is per compressor type.\n\nVersion 1.00 (dpkg 1.15.6)\nMark the module as public.\n",
                "subsections": []
            }
        }
    }
}