• Parameters

    Returns Bytes

    []byte

    Example


    import * as zip from 'zip'
    import * as buffer from 'buffer'
    import * as text from 'text';

    let bytes = text.bytes('I want to be binary');
    let buff = buffer.from("some data");

    let fileMap = {
    "/testdir/test.txt": "this is the data in test.txt",
    "/testdir/demo/bytes.txt": bytes,
    "/testdir/demo/buff.txt": buff.bytes(),
    }

    let strm = zip.compression(fileMap);