Skip to content

bymehul/splitget

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

splitget

a downloader. in c. uses libcurl and pthreads.

stuff it does

  • parallel chunks: handles multiple connections. thread pool thing. workers just grab stuff.
  • granular resume: if it dies, it saves what's left in a .meta file. use -r to continue.
  • adaptive chunking: it changes chunk size based on speed. fast net means bigger chunks. simple.
  • direct i/o: writes to final file with pwrite. no .part files. no merge step.
  • range detection: checks if ranges work. if not, it uses 1 thread.
  • c: it's small. doesn't use much ram.

build

libcurl and pthreads.

make

it makes splitget.

use

./splitget [opts] <url>

opts

  • -o <file>: output file. defaults to url name.
  • -n <num> : threads. 4 is default.
  • -r : resume. needs the .meta file.
  • -q : quiet. no bars.
  • -h : help.

example

./splitget -r -n 8 https://example.com/file.iso -o test.iso

logic

  • work-stealing queue for the chunks.
  • pwrite for the offsets.
  • linked list for the holes.

license

mit. copyright 2026 bymehul. check the license file.

About

a downloader. in c. uses libcurl and pthreads.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published