private async void SavePbis(IFileSystem archiveFileSystem, IList <IList <PointMapping> > mappings, IList <PointMapping> distinctPointMappings)
        {
            for (var pbiIndex = 0; pbiIndex < mappings.Count; pbiIndex++)
            {
                var pbiFile   = $"{pbiIndex:000}.pbi";
                var pbiStream = await archiveFileSystem.OpenFileAsync(pbiFile);

                var copy = new byte[0x8];
                pbiStream.Read(copy, 0, copy.Length);

                var output = new MemoryStream();
                var bw     = new BinaryWriterX(output, true);

                bw.Write(copy);
                bw.Write(mappings[pbiIndex].Count);

                var mappingIndices = mappings[pbiIndex]
                                     .Select(x => (short)distinctPointMappings.IndexOf(x))
                                     .ToArray();
                WriteMultipleCompressed(bw, mappingIndices, Level5CompressionMethod.Lz10);
                archiveFileSystem.SetFileData(pbiFile, output);

                bw.Dispose();
            }
        }