public override void Decompress(BrotliGlobalState state)
            {
                foreach (InsertCopyCommand icCommand in Data.InsertCopyCommands)
                {
                    state.OutputLiterals(icCommand.Literals);

                    if (icCommand.CopyDistance != DistanceInfo.EndsAfterLiterals)
                    {
                        state.OutputCopy(icCommand.CopyLength, icCommand.CopyDistance);
                    }
                }
            }
        private static void ExtractMetadata(List <object> row, CompressedData data, BrotliGlobalState state)
        {
            row.Add(data.InsertCopyCommands.Count);

            int literalBytes = 0;
            int backRefBytes = 0;
            int backRefCount = 0;
            int dictRefBytes = 0;
            int dictRefCount = 0;

            foreach (var command in data.InsertCopyCommands)
            {
                var literals     = command.Literals;
                var copyLength   = command.CopyLength;
                var copyDistance = command.CopyDistance;

                state.OutputLiterals(literals);
                literalBytes += literals.Count;

                if (copyDistance == DistanceInfo.EndsAfterLiterals)
                {
                    break;
                }

                var copy = state.OutputCopy(copyLength, copyDistance);

                if (copy.IsBackReference)
                {
                    backRefBytes += copy.BytesWritten;
                    ++backRefCount;
                }
                else
                {
                    dictRefBytes += copy.BytesWritten;
                    ++dictRefCount;
                }
            }

            row.Add(literalBytes);
            row.Add(backRefBytes);
            row.Add(dictRefBytes);
            row.Add(backRefCount);
            row.Add(dictRefCount);
        }