mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-14 00:55:46 -04:00
improved compression test
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-IdCleaning@7145 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
17d87617c8
commit
7b44c712df
1 changed files with 9 additions and 0 deletions
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <openssl/rand.h>
|
||||
#include "util/rscompress.h"
|
||||
#include "util/rsdir.h"
|
||||
#include "util/utest.h"
|
||||
|
@ -183,6 +184,14 @@ int main(int argc,char *argv[])
|
|||
temp/linux-g++-64/obj/p3photoservice.o \
|
||||
temp/linux-g++-64/obj/rsphotoitems.o" ;
|
||||
|
||||
for(int i=0;i<5;++i)
|
||||
source_string = source_string+source_string ;
|
||||
|
||||
source_string = source_string.substr(0,550000) ;
|
||||
|
||||
for(int i=0;i<source_string.length()/10;++i)
|
||||
source_string[lrand48()%(source_string.length())] = lrand48()&0xff ;
|
||||
|
||||
std::cerr << "Input string: length=" << source_string.length() << std::endl;
|
||||
std::cerr << "Input string: hash =" << RsDirUtil::sha1sum((uint8_t*)source_string.c_str(),source_string.length()).toStdString() << std::endl;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue