Ejemplo n.º 1
0
        public IFileChunkReference ReadFileChunkReference(StpFormat stpFormat, CbFormat cbFormat, string context)
        {
            if (stpFormat == StpFormat.Uncompressed8Bytes && cbFormat == CbFormat.Uncompressed4Bytes)
            {
                var fileChunkReference64x32 = new FileChunkReference64x32();
                ReadFileChunkReference64x32(ref fileChunkReference64x32, context);

                return(fileChunkReference64x32);
            }

            if (stpFormat == StpFormat.Uncompressed4Bytes && cbFormat == CbFormat.Uncompressed4Bytes)
            {
                var fileChunkReference32 = new FileChunkReference32();
                ReadFileChunkReference32(ref fileChunkReference32, context);

                return(fileChunkReference32);
            }

            if (stpFormat == StpFormat.Compressed2Bytes && cbFormat == CbFormat.Compressed1Byte)
            {
                var fileChunkReference16x8 = new FileChunkReference16x8();
                ReadFileChunkReference16x8(ref fileChunkReference16x8, context);

                return(fileChunkReference16x8);
            }

            throw new NotImplementedException("Reference format is not supported");
        }
Ejemplo n.º 2
0
 public TestCase(uint fileNodeId, uint size, StpFormat stpFormat, CbFormat cbFormat, uint value)
 {
     fileNodeID     = fileNodeId;
     this.size      = size;
     this.stpFormat = stpFormat;
     this.cbFormat  = cbFormat;
     this.value     = value;
 }