Ejemplo n.º 1
0
        /// <summary>
        /// get mz values only for aird file
        /// 默认从Aird文件中读取,编码Order为LITTLE_ENDIAN
        /// </summary>
        /// <param name="value"> 加密的数组 </param>
        /// <returns> 解压缩后的数组 </returns>
        public int[] getMzValuesAsInteger(byte[] value)
        {
            var intValues = CompressUtil.zlibDecoderToInt(value);

            intValues = CompressUtil.fastPforDecoder(intValues);
            return(intValues);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// get mz values only for aird file
        /// 默认从Aird文件中读取,编码Order为LITTLE_ENDIAN,精度为小数点后三位
        /// </summary>
        /// <param name="value">  压缩后的数组 </param>
        /// <param name="start">  起始位置 </param>
        /// <param name="length"> 读取长度 </param>
        /// <returns> 解压缩后的数组 </returns>
        public float[] getMzValues(byte[] value, int start, int length)
        {
            var Values    = CompressUtil.zlibDecoderToInt(value.Skip(start).Take(length).ToArray());
            var intValues = CompressUtil.fastPforDecoder(Values);

            float[] floatValues = new float[intValues.Length];
            for (int index = 0; index < intValues.Length; index++)
            {
                floatValues[index] = (float)intValues[index] / mzPrecision;
            }
            return(floatValues);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// get mz values only for aird file
        /// 默认从Aird文件中读取,编码Order为LITTLE_ENDIAN,精度为小数点后三位
        /// </summary>
        /// <param name="value"> 压缩后的数组 </param>
        /// <returns> 解压缩后的数组 </returns>
        public float[] getMzValues(byte[] value)
        {
            var Values    = CompressUtil.zlibDecoderToInt(value);
            var intValues = CompressUtil.fastPforDecoder(Values);

            float[] floatValues = new float[intValues.Length];
            for (int index = 0; index < intValues.Length; index++)
            {
                floatValues[index] = (float)intValues[index] / mzPrecision;
            }
            return(floatValues);
        }