Skip to content
/ chunker Public

Go command-line utility that splits large files into smaller chunks.

License

Notifications You must be signed in to change notification settings

itpey/chunker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chunker

Chunker is a command-line utility written in Go that splits a large file into smaller chunks based on a specified size. It's useful for breaking down large files into manageable pieces for easier handling or transfer.

Go Reference license

Features

  • Split large files into smaller chunks.
  • Specify the size of each chunk using intuitive size units (e.g., KB, MB, GB).
  • Simple and easy-to-use command-line interface.

Installation

Make sure you have Go installed and configured on your system. Use go install to install Chunker:

go install github.com/itpey/chunker@latest

Ensure that your GOBIN directory is in your PATH for the installed binary to be accessible globally.

Usage

chunker <inputFilePath> <outputPrefix> <chunkSize>
  • inputFilePath: Path to the input file that needs to be split.
  • outputPrefix: Prefix for the output chunk files.
  • chunkSize: Size of each chunk. Examples: 1KB, 5MB, 1GB.

Example

chunker input.txt outputChunk 1MB

This command will split input.txt into approximately 1MB chunks named outputChunk_1, outputChunk_2, etc.

Supported Size Units

  • B: Bytes
  • KB: Kilobytes (1024 bytes)
  • MB: Megabytes (1024 KB)
  • GB: Gigabytes (1024 MB)

Feedback and Contributions

If you encounter any issues or have suggestions for improvement, please open an issue on GitHub.

We welcome contributions! Fork the repository, make your changes, and submit a pull request.

License

Chunker is open-source software released under the Apache License, Version 2.0. You can find a copy of the license in the LICENSE file.

Author

Chunker was created by itpey