public override void Load(BinaryReader R)
{
// var POS = R.BaseStream.Position;
this.N = R.ReadInt32 ();
this.M = R.ReadInt32 ();
this.B = R.ReadInt16 ();
int num_samples = this.M / this.B;
/*if (num_samples > PLAIN_SAMPLES_THRESHOLD) {
var sa = new SArray();
sa.Load(R);
this.Samples = new SortedListSArray (sa);
sa = new SArray ();
sa.Load (R);
this.Offsets = new SortedListSArray (sa);
} else {*/
this.Samples = new List<int>( num_samples );
this.Offsets = new List<long>( num_samples );
PrimitiveIO<int>.LoadVector (R, num_samples, this.Samples);
PrimitiveIO<long>.LoadVector (R, num_samples, this.Offsets);
//}
// POS = R.BaseStream.Position - POS;
// Console.WriteLine("=======*******=======>> POS: {0}", POS);
this.Coder = IEncoder32GenericIO.Load (R);
this.Stream = new BitStream32 ();
this.Stream.Load (R);
//Console.WriteLine ("xxxxxx load samples.count {0}. N: {1}, M: {2}, B: {3}, BitCount: {4}",
// this.Samples.Count, this.N, this.M, this.B, this.Stream.CountBits);
}