Skip to content
This repository has been archived by the owner on Mar 19, 2023. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zion-chuu committed Mar 19, 2023
1 parent 2149115 commit 080cbf7
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
Download file in Golang
下载器小玩具
==================

[![Build Status](https://github.com/zion-chuu/fdlr/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/zion-chuu/fdlr/actions)

This MapReduce mindset is only advantageous when the volume of data is relatively large.
利用 MapReduce 的思路, 将大块数据拆分成小块数据处理, 然后最后再合并, 输出结果, 所以对于很小的下载数据来说, 效果并不好
下载功能利用 HTTP 头的 Range 功能

## Featues:
* support HTTP and HTTPS
* you can set the number of parallel to download
* download batches of files concurrently
* resume incomplete downloads
## 功能:
* 支持 HTTP HTTPS 应用层协议(其实是没特殊处理 HTTPS, 所以这两种效果都一样)
* 可以设置具体将要下载的数据进行分段数量, 每段一个 Goroutine
* 分段之后的数据, 每段并行处理
* 如果中途比如说, ctrl-D 了, 之后可以继续前面的下载(前提是之前的下载位置没变)

## Requires
## 构建要求:
Go v1.6+

## Example
## 栗子:
```
$ fdlr download -c=3 https://download.jetbrains.com/go/goland-2020.2.2.dmg
Downloading IP is: 52.50.241.213 | 54.72.98.183
Expand All @@ -35,6 +36,6 @@ goland-2020.2.2.dmg - 1 489.65 KiB / 131.98 MiB 0.36% 20m57s
goland-2020.2.2.dmg - 2 1.20 MiB / 132.25 MiB 0.91% 08m19s
```

## Inspired
## 灵感来自:
- [https://github.com/ytdl-org/youtube-dl](https://github.com/ytdl-org/youtube-dl)
- [https://github.com/cavaliercoder/grab](https://github.com/cavaliercoder/grab)

0 comments on commit 080cbf7

Please sign in to comment.