aria2的控制文件*.aria2的技术说明
Technical Notes
This document describes additional technical information of aria2. The expected audience is developers.
本文档描述了aria2的其他技术信息。预期的受众是开发人员。
Control File (*.aria2) Format
The control file uses a binary format to store progress information of a download. Here is the diagram for each field:
控制文件使用二进制格式来存储下载的进度信息。下面是每个字段的图:
0 1 2 30 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +---+-------+-------+-------------------------------------------+ |VER| EXT |INFO |INFO HASH ... | |(2)| (4) |HASH | (INFO HASH LENGTH) | | | |LENGTH | | | | | (4) | | +---+---+---+-------+---+---------------+-------+---------------+ |PIECE |TOTAL LENGTH |UPLOAD LENGTH |BIT- |BITFIELD ... | |LENGTH | (8) | (8) |FIELD | (BITFIELD | | (4) | | |LENGTH | LENGTH) | | | | | (4) | | +-------+-------+-------+-------+-------+-------+---------------+ |NUM |INDEX |LENGTH |PIECE |PIECE BITFIELD ... | |IN- | (4) | (4) |BIT- | (PIECE BITFIELD LENGTH) | |FLIGHT | | |FIELD | | |PIECE | | |LENGTH | | | (4) | | | (4) | | +-------+-------+-------+-------+-------------------------------+^ ^| |+-------------------------------------------------------+Repeated in (NUM IN-FLIGHT) PIECE times
-
VER
(VERSION): 2 bytes - Should be either version 0(0x0000) or version 1(0x0001). In version 1, all multi-byte integers are saved in network byte order(big endian). In version 0, all multi-byte integers are saved in host byte order. aria2 1.4.1 can read both versions and only writes a control file in version 1 format. version 0 support will be disappear in the future version.
- 应为版本0(0x0000)或版本1(0x0001)。在版本1中,所有多字节整数以网络字节顺序(大字节序)保存。在版本0中,所有多字节整数以主机字节顺序保存。aria2 1.4.1可以读取这两个版本,并且只写入版本1格式的控制文件。版本0支持将在以后的版本中消失。
-
EXT
(EXTENSION): 4 bytes -
If LSB is 1(i.e.
EXT[3]&1 == 1
), aria2 checks whether the saved !InfoHash and current downloading one are the same. If they are not the same, an exception is thrown. This is called "infoHashCheck" extension. -
如果LSB为1(即),aria2将检查保存的!InfoHash和当前下载的信息是否相同。如果它们不相同,则抛出异常。这被称为“infoHashCheck”扩展。
EXT[3]&1 == 1
-
INFO HASH LENGTH
: 4 bytes - The length of InfoHash that is located after this field. If "infoHashCheck" extension is enabled, if this value is 0, then an exception is thrown. For http/ftp downloads, this value should be 0.
- 位于此字段后面的InfoHash的长度。如果启用了“infoHashCheck”扩展,如果此值为0,则抛出异常。对于http / ftp下载,此值应为0。
-
INFO HASH
:(INFO HASH LENGTH)
bytes - BitTorrent InfoHash.
-
PIECE LENGTH
: 4 bytes - The length of the piece.
-
TOTAL LENGTH
: 8 bytes - The total length of the download.
-
UPLOAD LENGTH
: 8 bytes - The uploaded length in this download.
-
BITFIELD LENGTH
: 4 bytes - The length of bitfield.
-
BITFIELD
:(BITFIELD LENGTH)
bytes - This is the bitfield which represents current download progress.
-
NUM IN-FLIGHT PIECE
: 4 bytes - The number of in-flight pieces. These piece is not marked 'downloaded' in the bitfield, but it has at least one downloaded chunk.
The following 4 fields are repeated in (NUM IN-FLIGHT PIECE)
times.
-
INDEX
: 4 bytes - The index of the piece.
-
LENGTH
: 4 bytes - The length of the piece.
-
PIECE BITFIELD LENGTH
: 4 bytes - The length of bitfield of this piece.
-
PIECE BITFIELD
:(PIECE BITFIELD LENGTH)
bytes - The bitfield of this piece. The each bit represents 16KiB chunk.
aria2的控制文件*.aria2的技术说明相关推荐
- php搭建aria2,CentOS vps安装aria2 + ariaNg + h5ai搭建下载服务器
系统为CentOS7,搭建下载服务器,所用到的软件为 aria2:Linux下全功能下载工具 ariaNg:一款Aria2的WebUI工具 h5ai:一款功能强大php文件目录列表程序 一.安装ari ...
- aria2 linux一键安装,Aria2一键安装及管理脚本,搭建AriaNg前端
说明:Aria2作为一款linux下的下载神器,可以下载http资源.种子文件.磁力链接等,功能强大,就不过多介绍了,此前提到过Aria2安装方法,这里再说个逗比大佬的一键脚本,很方便,推荐使用. 一 ...
- linux aria2界面,如何使用aria2及webui
背景介紹 Aria2 是一個輕量的多協議多源命令行下載工具,支持 HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink 等協議下的下載.aria2 可通過內置的 ...
- oracle重建实例_记一次误删Oracle控制文件并恢复过程
概述 当你在数据库运行时误删除了控制文件怎么办?很不幸有一次我就有这个情况,虽然是测试环境,这里因为我有事先把控制文件分别备份,所以恢复还是比较简单的.下面简单记录下怎么恢复. 问题 控制文件版本不一 ...
- ORACLE11g 没有控制文件如何通过rman备份恢复数据的详细实战过程
1.副总裁需要裸恢复的严峻现实 集团总部的信息部负责人给我打电话说为了找一年前的记录,所以需要对一年前2015年5月1日的数据进行恢复.而2016年初因为进行迁移,所以有些文件可能丢失,手上只有rma ...
- oracle某个表丢失,丢失一个控制文件并恢复数据库
只丢失或损坏一个控制文件的情况下来恢复数据库,相对来说简单一点.一般来说,控制文件都需要形成 一个多路径冗余策略,来提高数据库的安全性.这样的话只需将完好的控制文件复制一个副本放到丢失或者 损坏了的控 ...
- oracle00214,oracle添加控制文件,ORA-00214: 错误
今天学习oracle添加控制文件,控制文件是一个二进制文件,记录了物理数据库的当前状态,每一个数据文件只属于一个数据库,为了防止文件损坏丢失等情况,一个数据库不止一个控制文件.一个数据库的控制文件中的 ...
- 重建控制文件具体解释
http://note.youdao.com/share/?id=d3991566cad33723db8b92183dcd9161&type=note 完整图文最新版 创造"重建 ...
- oracle控制文件发生坏块,控制文件坏块处理方法
1 说明 控制文件毫无疑问是一个数据库正常工作的必不可少的一个文件.非常重要,所以控制文件出现坏块需要第一时间进行修复.通常会以ORA-00227来表示控制文件出现坏块.https://www.cnd ...
最新文章
- 20 个 Pandas 数据实战案例,干货多多
- 这些Java代码优化细节,你需要注意!
- gre可以用计算机,GRE数学能用计算器吗
- [bzoj3585] Rmq Problem / mex
- 如何成为一名卓越的数据科学家——第一剑之再谈问题定义
- C# winform开发的考试系统
- 继承ActionSupport
- VS2010的项目配置属性中文对照
- Excel单元格下拉选择,单元格自动计算
- java数组的四种拷贝方式
- 【python爬虫】Python爬取下载巨潮网指定公司的年报pdf
- install package vif包_每天学点之CentOS软件源码包安装
- 什么是OXC(全光交叉)?
- 托福阅读基础训练方法
- http压力测试工具及使用说明
- php+flash头像上传组件
- 解读 | 全球七大央行最新报告:CBDC发行原则与核心特征
- layui镜像站 lh_yun.gitee.io/layui
- RAM ROM 寄存器(Rigester) CPU的关系
- android 钢琴识别音阶对错_【Sans钢琴音阶安卓最新版】Sans钢琴音阶安卓最新版手游下载v1.4-街机中国...