Пример #1
0
        public static HFSForkData Read(ref ReadOnlySpan <byte> data)
        {
            ulong logicalSize = ReadUInt64(ref data);
            uint  clumpSize   = ReadUInt32(ref data);
            uint  totalBlocks = ReadUInt32(ref data);

            var extents = new HFSExtentDescriptor[ExtentCount];

            for (int i = 0; i < ExtentCount; i++)
            {
                extents[i] = HFSExtentDescriptor.Read(ref data);
            }

            return(new HFSForkData(logicalSize, clumpSize, totalBlocks, extents));
        }
Пример #2
0
        public static HFSForkData Read(Stream stream)
        {
            ulong logicalSize = ReadUInt64(stream);
            uint  clumpSize   = ReadUInt32(stream);
            uint  totalBlocks = ReadUInt32(stream);

            var extents = new HFSExtentDescriptor[ExtentCount];

            for (int i = 0; i < ExtentCount; i++)
            {
                extents[i] = HFSExtentDescriptor.Read(stream);
            }

            return(new HFSForkData(logicalSize, clumpSize, totalBlocks, extents));
        }