"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "createDecodeTransformStream", {
    enumerable: true,
    get: function() {
        return createDecodeTransformStream;
    }
});
function createDecodeTransformStream(decoder = new TextDecoder()) {
    return new TransformStream({
        transform (chunk, controller) {
            return controller.enqueue(decoder.decode(chunk, {
                stream: true
            }));
        },
        flush (controller) {
            return controller.enqueue(decoder.decode());
        }
    });
}

//# sourceMappingURL=encode-decode.js.map