js-cfb/bits/63_header.js

21 lines
683 B
JavaScript
Raw Normal View History

2017-09-14 21:14:22 +00:00
{
for(i = 0; i < 8; ++i) o.write_shift(1, HEADER_SIG[i]);
for(i = 0; i < 8; ++i) o.write_shift(2, 0);
o.write_shift(2, 0x003E);
o.write_shift(2, 0x0003);
o.write_shift(2, 0xFFFE);
o.write_shift(2, 0x0009);
o.write_shift(2, 0x0006);
for(i = 0; i < 3; ++i) o.write_shift(2, 0);
o.write_shift(4, 0);
o.write_shift(4, L[2]);
o.write_shift(4, L[0] + L[1] + L[2] + L[3] - 1);
o.write_shift(4, 0);
o.write_shift(4, 1<<12);
o.write_shift(4, L[3] ? L[0] + L[1] + L[2] - 1: ENDOFCHAIN);
o.write_shift(4, L[3]);
o.write_shift(-4, L[1] ? L[0] - 1: ENDOFCHAIN);
o.write_shift(4, L[1]);
for(i = 0; i < 109; ++i) o.write_shift(-4, i < L[2] ? L[1] + i : -1);
}