frostwire / frostwire-jlibtorrent

A swig Java interface for libtorrent by the makers of FrostWire. Develop libtorrent based apps with the joy of coding in Java.
http://www.frostwire.com
MIT License
451 stars 138 forks source link

How to store data to every single file block by block #98

Closed ghost closed 8 years ago

ghost commented 8 years ago

By default, we specific a local file as torrent downloading destination. If that size of file is 1GB, the local file will be 1GB also even there only downloaded 10MB of actual data.

I want to improve the use ratio of storage in android devices. So I think can jlibtorrent support such feature: How to store data to every single file block by block. Or somethings similar.

I have seen the interface "StoragePlugin", but it doesn't like such a plugin.

gubatron commented 8 years ago

this is because you're using full allocation

Read this http://www.libtorrent.org/manual-ref.html#storage-allocation

gubatron commented 8 years ago

https://github.com/frostwire/frostwire-jlibtorrent/blob/master/src/main/java/com/frostwire/jlibtorrent/AddTorrentParams.java#L219