Changeset 2733


Ignore:
Timestamp:
Aug 13, 2007, 1:57:34 PM (15 years ago)
Author:
charles
Message:

(0.8x) make torrent creation's piece size more flexible. (ticket #293 reported by matt)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.8x/libtransmission/makemeta.c

    r2557 r2733  
    8787    static const uint64_t KiB = 1024;
    8888
    89     if( totalSize >= (8*GiB) )
    90         return MiB;
    91 
    92     if( totalSize <= (8*MiB) )
    93         return 256 * KiB;
    94 
    95     return 512 * KiB;
     89    if( totalSize >=      GiB  ) return MiB;
     90    if( totalSize >= (512*MiB) ) return (512*KiB);
     91    if( totalSize >= (350*MiB) ) return (256*KiB);
     92    if( totalSize >= (150*MiB) ) return (128*KiB);
     93    if( totalSize >=  (50*MiB) ) return (64*KiB);
     94    return (32*KiB); /* less than 50 meg */
    9695}
    9796
Note: See TracChangeset for help on using the changeset viewer.