Skip to content

Instantly share code, notes, and snippets.

View Umisyus's full-sized avatar

Umit Umisyus

View GitHub Profile
import { Actor, log } from "apify";
async function newFunction(FILE_SIZE = 5000000 /* Size in Megabytes */) {
await Actor.init();
console.time()
let numbers = Array.from(([...Array(FILE_SIZE).keys()]).map((i) => i * 1));
let zip = Buffer.from([...numbers]);
log.info(`zip size: ${zip.byteLength / 1000000} MB`);