1.0.18 • Published 8 months ago

file-plz v1.0.18

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

šŸ“‚ File Please

A simple command-line tool to generate files of various types and specific sizes.


šŸš€ Features

  • šŸ“ Create files of common types (e.g., .txt, .zip, .jpg, etc.)
  • šŸ“ Specify exact file size (e.g., 10KB, 5MB, 1GB, etc.)
  • ⚔ Fast and lightweight utility

šŸ“‹ Prerequisites

  • Node.js v22.12 (LTS)

šŸ”§ Installation

Install globally using npm:

npm install file-plz -g

šŸ“˜ Usage

Basic usage:

npx file-plz -t txt -s 10KB

Options: | Option | Shorthan | Description | Example | |----------------|----------------|-------------------------------------|-------------------| | --size | -s | Size of the file (KB, MB, or GB) | 10KB, 5MB | | --type | -t | File extension | jpg, txt | | --debug | -d | Output debug info | - |


šŸ“¦ Examples

  1. Create a 1MB text file

    npx file-plz -t txt -s 1MB
  2. Create a 500KB bitmap file

    npx file-plz -t txt --size 500KB --t .bmp
  3. Create a 1GB archive file

    npx file-plz -t zip -size 1GB

šŸ› ļø How It Works

  • File Generation: The program has a base set of instructions to create simple files, which are then merged with more complex file types to achieve the specific file size.
  • File Content: The data within the files is random characters or generated noise.

āš ļø Challenges with File Size Accuracy

Achieving precise file sizes can be challenging, especially when working with compression and noise. For compressed file types (like .zip), the final size depends on the compressibility of the file's contents. Random data is less compressible than repeating patterns, which can affect the actual size. Similarly, files with "noise" data may not be perfectly predictable in size, as different file systems and tools may handle binary data differently. This tool strives to get as close as possible to the requested size, but minor deviations may occur.


šŸ› Issues & Contributions

  • Found a bug? Open an issue here.
  • Want to contribute? Fork the repo, make changes, and submit a pull request.

šŸ“œ License

This project is licensed under the MIT License. See LICENSE for details.


⭐ If you find this tool useful, please give it a star!

1.0.18

8 months ago

1.0.17

8 months ago

1.0.16

8 months ago

1.0.9

8 months ago

1.0.8

8 months ago

1.0.11

8 months ago

1.0.10

8 months ago

1.0.15

8 months ago

1.0.13

8 months ago

1.0.12

8 months ago

1.0.6

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

8 months ago

0.0.1

8 months ago

1.0.0

8 months ago