
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A Node.js CLI utility to generate files of exact byte sizes efficiently via stream-chunked writing, perfect for testing, benchmarking, or disk space simulations.
Read this in other languages: 简体中文 | English
With streaming write technology, precisely generate files of a specified size.
sizegen is a command-line tool that uses streaming chunk writing to generate files of fixed sizes. It is ideal for disk testing, performance benchmarking, and generating sample data. The streaming method ensures that even large files can be generated efficiently while significantly reducing memory usage.
Efficient Streaming Generation
Generates large files efficiently using chunked writing, ensuring minimal memory usage.
Customizable Chunk Size
Allows users to specify the size of the chunks used during writing based on their requirements.
Globally install sizegen using npm:
npm install -g size-gen
Alternatively, you can use other package managers for global installation:
pnpm:
pnpm add -g size-gen
yarn:
yarn global add size-gen
Note: Please ensure that Node.js is installed.
The basic command format for running sizegen is as follows:
sizegen <output> --size <size> [--chunk <chunk>]
Where:
<output>: The output file name (must include a file extension, e.g., data.bin).--size <size>: Specifies the target file size with a unit (e.g., 10B, 512KB, 2MB, or 3.5GB).--chunk <chunk>: (Optional) Specifies the chunk size used for writing, such as 16KB, 1MB, or 4MB. The default is 64KB.Generate a 10MB file using the default chunk size:
sizegen sample.bin --size 10MB
Generate a 2GB file using a 1MB chunk size:
sizegen large.dat --size 2GB --chunk 1MB
You can also use abbreviated options:
-s in place of --size-c in place of --chunkFor example:
sizegen data.bin -s 10MB -c 64KB
We welcome contributions, bug reports, and feature suggestions! Before submitting an issue, please check the Issues page to see if similar feedback has already been provided.
This project is released under the MIT License.
FAQs
A Node.js CLI utility to generate files of exact byte sizes efficiently via stream-chunked writing, perfect for testing, benchmarking, or disk space simulations.
We found that size-gen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.