1
0
mirror of https://github.com/chylex/Brotli-Builder.git synced 2024-12-22 16:42:46 +01:00
Brotli-Builder/BrotliLib/Markers/Marker.cs

27 lines
729 B
C#

using System;
using BrotliLib.Markers.Types;
namespace BrotliLib.Markers{
public class Marker : IComparable<Marker>{
public int IndexStart { get; }
public int IndexEnd { get; }
public int Length => IndexEnd - IndexStart;
public IMarkerInfo Info { get; }
public Marker(int indexStart, int indexEnd, IMarkerInfo info){
this.IndexStart = indexStart;
this.IndexEnd = indexEnd;
this.Info = info;
}
public bool HasIndex(int index){
return index >= IndexStart && index < IndexEnd;
}
public int CompareTo(Marker other){
return IndexStart.CompareTo(other.IndexStart);
}
}
}