Pointer.cs 610 B

12345678910111213141516171819202122232425
  1. namespace SharpCompress.Compressors.PPMd.H
  2. {
  3. internal abstract class Pointer
  4. {
  5. /// <summary> Initialize the object with the array (may be null)</summary>
  6. /// <param name="mem">the byte array
  7. /// </param>
  8. internal Pointer(byte[] mem)
  9. {
  10. Memory = mem;
  11. }
  12. internal byte[] Memory { get; private set; }
  13. internal virtual int Address { get; set; }
  14. protected T Initialize<T>(byte[] mem)
  15. where T : Pointer
  16. {
  17. Memory = mem;
  18. Address = 0;
  19. return this as T;
  20. }
  21. }
  22. }