@@ -7,23 +7,26 @@ var fs = require( 'fs' )
77var suite = new Benchmark . Suite
88
99var buffer = fs . readFileSync ( __dirname + '/test.torrent' )
10- var data = bencode . decode ( buffer , true )
10+ var data = bencode . decode ( buffer , 'ascii' )
1111var string = bencode . encode ( data )
1212
1313suite
14- . add ( 'new# encode( Object )' , function ( ) {
14+ . add ( 'new. encode( Object )' , function ( ) {
1515 bencode . encode ( data )
1616 } )
17- . add ( 'old# encode( Object )' , function ( ) {
17+ . add ( 'old. encode( Object )' , function ( ) {
1818 old . encode ( data )
1919 } )
20- . add ( 'new# decode( Buffer )' , function ( ) {
20+ . add ( 'new. decode( Buffer )' , function ( ) {
2121 bencode . decode ( buffer )
2222 } )
23- . add ( 'new# decode( Buffer, true )' , function ( ) {
24- bencode . decode ( buffer , true )
23+ . add ( 'new. decode( Buffer, "ascii" )' , function ( ) {
24+ bencode . decode ( buffer , 'ascii' )
2525 } )
26- . add ( 'old#decode( String )' , function ( ) {
26+ . add ( 'new.decode( Buffer, "utf8" )' , function ( ) {
27+ bencode . decode ( buffer , 'utf8' )
28+ } )
29+ . add ( 'old.decode( String )' , function ( ) {
2730 old . decode ( string )
2831 } )
2932 . on ( 'cycle' , function ( event , bench ) {
0 commit comments