Need help with teemo?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

161 Stars 19 Forks GNU General Public License v3.0 99 Commits 2 Opened issues


C++ File Download Library.

Services available


Need anything else?

Contributors list

No Data

Build Status Vcpkg package badge

English | 简体中文

1. Introduction

There are many mature and powerful download tools at present, such as

Free Download Manager
, etc. However when I want to find a library that support multiple protocols (such as http, ftp), multi-threaded download, breakpoint resume download, cross-platform, I realize that this is difficult to find a satisfactory library, especially developed by C++.

So I developed this download library named

based on libcurl, which can support the following features:

✅ Support Multi-protocol. Since teemo based on libcurl, so it supports all protocols that same as libcurl.

✅ Support multi-threaded download.

✅ Support breakpoint resume.

✅ Support for obtaining real-time download rate.

✅ Support download speed limit.

✅ Support disk cache.

2. Compile and Install

Method 1: Using with vcpkg


library has been included in Microsoft's vcpkg, you can use the following command to install
vcpkg install teemo:x86-windows

About vcpkg:

Method 2: Compile from source code

Step 1: Install dependencies

I prefer to use

to install dependencies. Of course, this is not the only way, you can install dependencies through any ways.
  • libcurl
# if you want support non-http protocol, such as ftp, the [non-http] option must be specified.
vcpkg install curl[non-http]:x86-windows
  • gtest

unit test project depend on gtest.

vcpkg install gtest:x86-windows

Step 2: Compile teemo

Firstly using CMake to generate project or makefile, then comiple it:

# Windows Sample
cmake.exe -G "Visual Studio 15 2017" -DBUILD_SHARED_LIBS=ON -DBUILD_TESTS=ON -S %~dp0 -B %~dp0build

Linux Sample

cmake -DBUILD_SHARED_LIBS=ON -DBUILD_TESTS=ON make make install

3. Getting Started

#include "teemo.h"

int main(int argc, char** argv) { using namespace teemo;


Teemo efd;

efd.setThreadNum(10); // Optional efd.setTmpFileExpiredTime(3600); // Optional efd.setDiskCacheSize(20 * (2 << 19)); // Optional efd.setMaxDownloadSpeed(50 * (2 << 19)); // Optional efd.setHashVerifyPolicy(ALWAYS, MD5, "6fe294c3ef4765468af4950d44c65525"); // Optional, support MD5, CRC32, SHA256 efd.setVerboseOutput([](const utf8string& verbose) { // Optional printf("%s\n", verbose.c_str()); });

std::shared_future async_task = efd.start( u8"", u8"D:\test.exe", [](Result result) { // Optional // result callback }, [](int64_t total, int64_t downloaded) { // Optional // progress callback }, [](int64_t byte_per_secs) { // Optional // real-time speed callback });



return 0; }

4. Command-line tool

is command-line download tool based on


teemo_tool URL TargetFilePath [ThreadNum] [DiskCacheMb] [MD5] [TmpExpiredSeconds] [MaxSpeed]
  • URL: Download URL.
  • TargetFilePath: target file saved path.
  • ThreadNum: thread number, optional, default is
  • DiskCacheMb: Disk cache size(Mb), default is
  • MD5: target file md5, optional, if this value isn't empty, tools will check file md5 after download finished.
  • TmpExpiredSeconds: seconds, optional, the temporary file will expired after these senconds.
  • MaxSpeed: max download speed(byte/s).

5. Donate

This project does not accept donations, Thank you for your kindness, If you think this project helped you, you can give the project a star.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.