]>
Commit | Line | Data |
---|---|---|
2e9f335b | 1 | #if !defined(__CINT__) || defined(__MAKECINT__) |
2 | #include <fstream.h> | |
3 | #include <alles.h> | |
4 | #include "AliTPCCompression.h" | |
5 | #endif | |
6 | ||
7 | /* | |
8 | This macro compress and decompress an Altro format file using Huffman technique with 5 tables | |
9 | */ | |
10 | ||
11 | void AliTPCH5OptimizedTables(const char* fSource="AltroFormat.dat",const char* fDest="CompressedData.dat"){ | |
12 | cout<<"Source file: "<<fSource<<" Output file: "<<fDest<<endl; | |
13 | static const Int_t NumTable=5; | |
14 | AliTPCCompression *util = new AliTPCCompression(); | |
15 | TStopwatch timer; | |
16 | util->SetVerbose(2); | |
17 | //Tables are created | |
18 | util->CreateTables(fSource,NumTable); | |
19 | //util->ReadAltroFormat("File1.txt","AltroFormat.dat"); | |
20 | //The source file is compressed | |
21 | ||
22 | timer.Start(); | |
23 | util->CompressDataOptTables(NumTable,fSource,fDest); | |
24 | timer.Stop(); | |
25 | timer.Print(); | |
26 | ||
27 | /* | |
28 | //The Compressed file is decompressed | |
29 | timer.Start(); | |
30 | util->DecompressDataOptTables(NumTable,fDest); | |
31 | timer.Stop(); | |
32 | timer.Print(); | |
33 | //util->ReadAltroFormat("File2.txt","SourceDecompressed.dat"); | |
34 | */ | |
35 | delete util; | |
36 | } |