forked from simongog/sdsl-lite
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexpl-02.cpp
More file actions
Latest commit
18 lines (16 loc) · 441 Bytes
/
Copy pathexpl-02.cpp
File metadata and controls
18 lines (16 loc) · 441 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include<iostream>
#include<sdsl/vectors.hpp>
usingnamespacestd;
usingnamespacesdsl;
intmain()
{
int_vector<> v(10*(1<<20));
for (size_t i=0; i<10; ++i)
for (size_t j=0; j < 1U<<20; ++j)
v[i*(1<<20)+j] = j;
cout << size_in_mega_bytes(v) << endl;
util::bit_compress(v);
cout << size_in_mega_bytes(v) << endl;
enc_vector<coder::comma<>> ev(v);
cout << size_in_mega_bytes(ev) << endl;
}