/// <summary> /// Static ctor /// </summary> static GorillaCodec() { //magic numbers _gorIndexMap = new GorillaAlgoByte[] { // cBits cPads Index new GorillaAlgoByte(8, 0), // 0 // for 1 new GorillaAlgoByte(1, 0), // 1 new GorillaAlgoByte(1, 1), // 2 new GorillaAlgoByte(1, 2), // 3 new GorillaAlgoByte(1, 3), // 4 new GorillaAlgoByte(1, 4), // 5 new GorillaAlgoByte(1, 5), // 6 new GorillaAlgoByte(1, 6), // 7 new GorillaAlgoByte(1, 7), // 8 // for 2 new GorillaAlgoByte(2, 0), // 9 new GorillaAlgoByte(2, 1), // 10 new GorillaAlgoByte(2, 2), // 11 new GorillaAlgoByte(2, 3), // 12 // for 3 new GorillaAlgoByte(3, 0), // 13 new GorillaAlgoByte(3, 1), // 14 new GorillaAlgoByte(3, 2), // 15 // for 4 new GorillaAlgoByte(4, 0), // 16 new GorillaAlgoByte(4, 1), // 17 // for 5 new GorillaAlgoByte(5, 0), // 18 new GorillaAlgoByte(5, 1), // 19 // for 6 new GorillaAlgoByte(6, 0), // 20 new GorillaAlgoByte(6, 1), // 21 // for 7 new GorillaAlgoByte(7, 0), // 22 new GorillaAlgoByte(7, 1) }; // 23 _gorIndexOffset = new byte[] { 0, // for 0, never used 1, // [ 1, 8] for 1 9, // [ 9, 12] for 2 13, // [13, 15] for 3 16, // [16, 17] for 4 18, // [18, 19] for 5 20, // [20, 21] for 6 22 }; // [22, 23] for 7 }
/// <summary> /// Static ctor /// </summary> static GorillaCodec() { //magic numbers _gorIndexMap = new GorillaAlgoByte[] { // cBits cPads Index new GorillaAlgoByte(8, 0), // 0 // for 1 new GorillaAlgoByte(1, 0), // 1 new GorillaAlgoByte(1, 1), // 2 new GorillaAlgoByte(1, 2), // 3 new GorillaAlgoByte(1, 3), // 4 new GorillaAlgoByte(1, 4), // 5 new GorillaAlgoByte(1, 5), // 6 new GorillaAlgoByte(1, 6), // 7 new GorillaAlgoByte(1, 7), // 8 // for 2 new GorillaAlgoByte(2, 0), // 9 new GorillaAlgoByte(2, 1), // 10 new GorillaAlgoByte(2, 2), // 11 new GorillaAlgoByte(2, 3), // 12 // for 3 new GorillaAlgoByte(3, 0), // 13 new GorillaAlgoByte(3, 1), // 14 new GorillaAlgoByte(3, 2), // 15 // for 4 new GorillaAlgoByte(4, 0), // 16 new GorillaAlgoByte(4, 1), // 17 // for 5 new GorillaAlgoByte(5, 0), // 18 new GorillaAlgoByte(5, 1), // 19 // for 6 new GorillaAlgoByte(6, 0), // 20 new GorillaAlgoByte(6, 1), // 21 // for 7 new GorillaAlgoByte(7, 0), // 22 new GorillaAlgoByte(7, 1)}; // 23 _gorIndexOffset = new byte[]{ 0, // for 0, never used 1, // [ 1, 8] for 1 9, // [ 9, 12] for 2 13, // [13, 15] for 3 16, // [16, 17] for 4 18, // [18, 19] for 5 20, // [20, 21] for 6 22};// [22, 23] for 7 }