Skip to content

Zip

Unstable API 0.10.0 @project-lakechain/zip-processor TypeScript

The Zip deflate processor makes it easy to package multiple documents into a single compressed Zip archive. This makes it possible to package the result of the processing of specific documents into a single archive ready to be stored, or shared with another system.


🗄️ Deflating Archives

To use this middleware, you import it in your CDK stack and connect it to a data source that provides documents.

import { ZipDeflateProcessor } from '@project-lakechain/zip-processor';
import { CacheStorage } from '@project-lakechain/core';
class Stack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string) {
// Sample bucket.
const bucket = new s3.Bucket(this, 'Bucket', {});
// The cache storage.
const cache = new CacheStorage(this, 'Cache');
// Create the Zip deflate processor.
const zipProcessor = new ZipDeflateProcessor.Builder()
.withScope(this)
.withIdentifier('ZipProcessor')
.withCacheStorage(cache)
.withSource(source)
.build();
}
}


🏗️ Architecture

The Zip deflate processor uses AWS Lambda as a compute for creating archives. The compute can run up to 15 minutes to package the files into a compressed archive, and provides the next middlewares in the pipeline with the created Zip archive

Zip Deflate Architecture



🏷️ Properties


Supported Inputs
Mime TypeDescription
*/*This middleware supports any type of documents as an input.
Supported Outputs
Mime TypeDescription
application/zipThe Zip deflate processor produces Zip archives.
Supported Compute Types
TypeDescription
CPUThis middleware only supports CPU compute.


📖 Examples