{
    "mode": "man",
    "parameter": "STREAMZIP",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/STREAMZIP/1/json",
    "generated": "2026-10-22T14:38:50Z",
    "synopsis": "producer | streamzip [opts] | consumer\nproducer | streamzip [opts] -zipfile=output.zip",
    "sections": {
        "NAME": {
            "content": "streamzip - create a zip file from stdin\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "producer | streamzip [opts] | consumer\nproducer | streamzip [opts] -zipfile=output.zip\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This program will read data from \"stdin\", compress it into a zip container and, by default,\nwrite a streamed zip file to \"stdout\". No temporary files are created.\n\nThe zip container written to \"stdout\" is, by necessity, written in streaming format. Most\nprograms that read Zip files can cope with a streamed zip file, but if interoperability is\nimportant, and your workflow allows you to write the zip file directly to disk you can create\na non-streamed zip file using the \"zipfile\" option.\n\nOPTIONS",
            "subsections": [
                {
                    "name": "-zip64",
                    "content": "Create  a  Zip64-compliant  zip  container. Use this option if the input is greater than\n4Gig.\n\nDefault is disabled.\n\n-zipfile=F\nWrite zip container to the filename \"F\".\n\nUse the \"Stream\" option to force the creation of a streamed zip file.\n\n-member-name=M\nThis option is used to name the \"file\" in the zip container.\n\nDefault is '-'.\n"
                },
                {
                    "name": "-stream",
                    "content": "Ignored when writing to \"stdout\".\n\nIf the \"zipfile\" option is specified, including this option will trigger the creation of\na streamed zip file.\n\nDefault: Always enabled when writing to \"stdout\", otherwise disabled.\n\n-method=M\nCompress using method \"M\".\n\nValid method names are\n\n* store    Store without compression\n* deflate  Use Deflate compression [Deflault]\n* bzip2    Use Bzip2 compression\n* lzma     Use LZMA compression\n* xz       Use xz compression\n* zstd     Use Zstandard compression\n\nNote that Lzma compress needs \"IO::Compress::Lzma\" to be installed.\n\nNote that Zstd compress needs \"IO::Compress::Zstd\" to be installed.\n\nDefault is \"deflate\".\n\n-0, -1, -2, -3, -4, -5, -6, -7, -8, -9\nSets the compression level for \"deflate\". Ignored for all other compression methods.\n\n-0 means no compression and -9 for maximum compression.\n\nDefault is 6\n"
                },
                {
                    "name": "-version",
                    "content": "Display version number\n"
                },
                {
                    "name": "-help",
                    "content": "Display help\n"
                },
                {
                    "name": "Examples",
                    "content": "Create a zip file bt reading daa from stdin\n\n$ echo Lorem ipsum dolor sit | perl ./bin/streamzip >abcd.zip\n\nCheck the contents of \"abcd,zip\" with the standard \"unzip\" utility\n\nArchive:  abcd.zip\nLength      Date    Time    Name\n---------  ---------- -----   ----\n22  2021-01-08 19:45   -\n---------                     -------\n22                     1 file\n\nNotice how the \"Name\" is set to \"-\".  That is the default for a few zip utilities  whwre  the\nmember name is not given.\n\nIf you want to explicitly name the file, use the \"-member-name\" option as follows\n\n$ echo Lorem ipsum dolor sit | perl ./bin/streamzip -member-name latin >abcd.zip\n\n$ unzip -l abcd.zip\nArchive:  abcd.zip\nLength      Date    Time    Name\n---------  ---------- -----   ----\n22  2021-01-08 19:47   latin\n---------                     -------\n22                     1 file\n"
                },
                {
                    "name": "When to write a Streamed Zip File",
                    "content": "A  Streamed  Zip File is useful in situations where you cannot seek backwards/forwards in the\nfile.\n\nA good examples is when you are serving dynamic content from a Web  Server  straight  into  a\nsocket without needing to create a temporary zip file in the filesystsm.\n\nSimilarly if your workfow uses a Linux pipelined commands.\n"
                }
            ]
        },
        "SUPPORT": {
            "content": "General        feedback/questions/bug       reports       should       be       sent       to\n<https://github.com/pmqs/IO-Compress/issues>                  (preferred)                  or\n<https://rt.cpan.org/Public/Dist/Display.html?Name=IO-Compress>.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Paul Marquess pmqs@cpan.org.\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Copyright (c) 2019-2022 Paul Marquess. All rights reserved.\n\nThis  program is free software; you can redistribute it and/or modify it under the same terms\nas Perl itself.\n\nperl v5.38.2                                 2026-08-18                                 STREAMZIP(1)",
            "subsections": []
        }
    },
    "summary": "streamzip - create a zip file from stdin",
    "flags": [
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Create a Zip64-compliant zip container. Use this option if the input is greater than 4Gig. Default is disabled. -zipfile=F Write zip container to the filename \"F\". Use the \"Stream\" option to force the creation of a streamed zip file. -member-name=M This option is used to name the \"file\" in the zip container. Default is '-'."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Ignored when writing to \"stdout\". If the \"zipfile\" option is specified, including this option will trigger the creation of a streamed zip file. Default: Always enabled when writing to \"stdout\", otherwise disabled. -method=M Compress using method \"M\". Valid method names are * store Store without compression * deflate Use Deflate compression [Deflault] * bzip2 Use Bzip2 compression * lzma Use LZMA compression * xz Use xz compression * zstd Use Zstandard compression Note that Lzma compress needs \"IO::Compress::Lzma\" to be installed. Note that Zstd compress needs \"IO::Compress::Zstd\" to be installed. Default is \"deflate\". -0, -1, -2, -3, -4, -5, -6, -7, -8, -9 Sets the compression level for \"deflate\". Ignored for all other compression methods. -0 means no compression and -9 for maximum compression. Default is 6"
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Display version number"
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Display help"
        }
    ],
    "examples": [],
    "see_also": []
}