summaryrefslogtreecommitdiff
path: root/test/PieceTest.cc
Commit message (Collapse)AuthorAgeFilesLines
* make clang-format using clang-format-3.6Tatsuhiro Tsujikawa2015-12-271-18/+18
|
* Use user-defined literal for k, m, and g (powers of 1024)Tatsuhiro Tsujikawa2015-06-211-6/+6
|
* Fix file length information in RPC response when length > 2GB is unknownTatsuhiro Tsujikawa2014-07-121-1/+1
| | | | | | | This commit fixes the bug that aria2.tellStopped RPC method returns total length and completedLength as 0 when file size is unknown in advance and turns out > 2GB in the end. This commit and addresses the performance degradation in this case.
* Remove ENABLE_MESSAGE_DIGEST, since we got the internal md, alwaysNils Maier2014-04-171-11/+0
|
* AbstractSingleDiskAdaptor: Use std::unique_ptr for diskWriter_Tatsuhiro Tsujikawa2013-07-061-4/+5
|
* Require -std=c++11 and use std::shared_ptr instead of SharedHandleTatsuhiro Tsujikawa2013-06-221-2/+2
|
* Append new data to the contagious cache dataTatsuhiro Tsujikawa2012-12-061-0/+19
| | | | | | If we receive small data (e.g., 1 or 2 bytes), cache entry becomes a headache. To mitigate this problem, we allocate cache buffer at least 4KiB and append the data to the contagious cache data.
* Added --disk-cache optionTatsuhiro Tsujikawa2012-12-031-3/+65
| | | | | | | | | | This option enables disk cache. If SIZE is 0, the disk cache is disabled. This feature caches the downloaded data in memory, which grows to at most SIZE bytes. The cache storage is created for aria2 instance and shared by all downloads. The one advantage of the disk cache is reduce the disk seek time because the data is written in larger unit and it is reordered by the offset of the file. If the underlying file is heavily fragmented it is not the case.
* Removed trailing spacesTatsuhiro Tsujikawa2012-10-011-4/+4
|
* Use int32_t for piece length instead of size_tTatsuhiro Tsujikawa2011-12-091-1/+1
|
* Stored hash value as raw byte string, instead of hex digest.Tatsuhiro Tsujikawa2011-10-131-1/+3
|
* Consistent naming scheme for hash type and digest for Piece.Tatsuhiro Tsujikawa2011-07-271-1/+1
|
* 2010-11-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-11-111-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced MessageDigestContext with MessageDigest. Cleaned up unnecessary functions in MessageDigestHelper. * src/BtPieceMessage.cc * src/Checksum.h * src/DHTTokenTracker.cc * src/DownloadCommand.cc * src/DownloadCommand.h * src/HashFuncEntry.h * src/IteratableChecksumValidator.cc * src/IteratableChecksumValidator.h * src/IteratableChunkChecksumValidator.cc * src/IteratableChunkChecksumValidator.h * src/LibgcryptMessageDigestImpl.cc * src/LibgcryptMessageDigestImpl.h * src/LibsslMessageDigestImpl.cc * src/LibsslMessageDigestImpl.h * src/MSEHandshake.cc * src/MSEHandshake.h * src/Makefile.am * src/MessageDigest.cc * src/MessageDigest.h * src/MessageDigestHelper.cc * src/MessageDigestHelper.h * src/MessageDigestImpl.h * src/MetalinkParserController.cc * src/Piece.cc * src/Piece.h * src/UTMetadataDataExtensionMessage.cc * src/bittorrent_helper.cc * src/messageDigest.cc: Removed * src/messageDigest.h: Removed * src/util.cc * src/version_usage.cc * test/BittorrentHelperTest.cc * test/GZipDecoderTest.cc * test/GZipDecodingStreamFilterTest.cc * test/IteratableChecksumValidatorTest.cc * test/IteratableChunkChecksumValidatorTest.cc * test/Makefile.am * test/MessageDigestHelperTest.cc * test/MessageDigestTest.cc * test/Metalink2RequestGroupTest.cc * test/MetalinkProcessorTest.cc * test/PieceTest.cc * test/TestUtil.cc * test/TestUtil.h * test/UTMetadataDataExtensionMessageTest.cc * test/UTMetadataPostDownloadHandlerTest.cc
* 2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>Tatsuhiro Tsujikawa2010-01-051-6/+6
| | | | | | | | | Untabify. Fixed one line in copyright which is longer than 80 columns. * src * test
* 2008-06-05 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-06-041-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | Calculate piece hash when data is arrived if the data is arrived in order. This removes additional read operation for hash calculation. If the data is arrived in out of order, the hash is calucated when the piece is completed. This is the same behavior as the old implementation. * src/BtPieceMessage.cc * src/DefaultBtProgressInfoFile.cc * src/DefaultPieceStorage.cc * src/DownloadCommand.cc * src/DownloadCommand.h * src/DownloadEngine.cc * src/GrowSegment.cc * src/GrowSegment.h * src/Piece.cc * src/Piece.h * src/PiecedSegment.cc * src/PiecedSegment.h * src/Segment.h * test/PieceTest.cc
* 2008-03-11 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-03-111-3/+3
| | | | | | | | | | | | | | | | | | | | Added summary log for peer announce storage. * src/DHTPeerAnnounceStorage.cc (handleTimeout) Removed cast * src/DefaultPeerStorage.cc (addPeer) Log exception message * src/DHTMessageTracker.cc (handleTimeout) Fixed casting * test/HttpRequestTest.cc * test/MetalinkProcessorTest.cc * test/PieceTest.cc * test/MetalinkEntryTest.cc * test/SequenceTest.cc
* 2008-03-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Type clarification: size_t for length or size, uint64_t for file length, off_t for file offset. * src/PiecedSegment.cc * src/GrowSegment.h * src/DefaultBtRequestFactory.h * src/DefaultBtProgressInfoFile.cc * src/UnknownLengthPieceStorage.h * src/DefaultPieceStorage.cc * src/UnknownLengthPieceStorage.cc * src/DefaultBtInteractive.cc * src/GrowSegment.cc * src/BitfieldMan.h * src/DownloadCommand.cc * src/BtRequestFactory.h * src/PiecedSegment.h * src/DefaultPieceStorage.h * src/Piece.cc * src/DefaultBtRequestFactory.cc * src/PieceStorage.h * src/Segment.h * src/Piece.h * src/BitfieldMan.cc * src/Util.cc * test/DefaultBtProgressInfoFileTest.cc * test/DefaultPieceStorageTest.cc * test/MockPieceStorage.h * test/BtRequestMessageTest.cc * test/DefaultBtMessageDispatcherTest.cc * test/BitfieldManTest.cc * test/GrowSegmentTest.cc * test/PieceTest.cc * test/SegmentTest.cc * test/SegmentManTest.cc * test/DefaultBtRequestFactoryTest.cc * test/MockBtRequestFactory.h
* 2008-03-07 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-03-071-64/+4
| | | | | | | | | | Removed subPiece related functions. * src/Piece.{h, cc} : Also rewritten getCompletedLength(). * src/DefaultPieceStorage.{h, cc} * test/PieceTest.cc * test/DefaultPieceStorageTest.cc
* 2008-02-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2008-02-081-5/+7
| | | | | | | | | Removed "using namespace std;" from all sources. Appended std:: prefix to c++ standard classes. Included string.h where mem* function are used.
* 2007-10-24 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>Tatsuhiro Tsujikawa2007-10-231-0/+106
* src/Piece.{h, cc}: Added SubPiece infrastructure to track down the data smaller than block length. A block length can be specified by constructor's argument. * src/DefaultPieceStorage.{h, cc} (getMissingPiece): Get a missing piece in the range of given FileEntry. This function is not used in the program yet. * src/Util.h: Added some macros.