Arguments include adding torrents as paused/started, skiping hash check, setting category, downloading in sequential order, downloading first and last pieces first, and skipping the 'add new torrent' dialog. Added TriStateBoolOption class for specifying options that don't have a default value when unused (e.g. add-paused). Also improved command line usage text to include more information, have better organization, and not exceed 80 columns in width. Also also added firstLastPiecePriority field to BitTorrent::AddTorrentData, and modified TorrentHandle so that if first/last piece priority should be on, it will be toggled on after the torrent's metadata has loaded.
Looking for incomplete files in a new torrent by using a pre-generated
directory listing presents several disadvantages:
- It requires us to extract the top-level directory name (in case it
was renamed).
- It requires us to know whether the top-level directory was stripped.
- In the latter case, it may result in recursively traversing the
entire contents of all downloaded torrents.
Calling QFile::exists() individually for each file solves all these
issues.
In so doing, the handling of single-file and multiple-file torrents are
rendered pretty much identical, and can therefore be merged.
Rename from uncompress to decompress
Change signature
Use proper casting
Use larger buffer for the output of inflate()
Reserve 1 MBytes for output buffer
Change function signature
Change signature
Add ZLIB_CONST define to make z_stream.next_in const
Cast to zlib defined type Bytef*
Set memLevel to 9 in deflateInit2() for maximum performance
Revise compression loop
On returning false, free memory correctly by calling deflateEnd()
Reserve space by the estimation of deflateBound()