The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ByteHelper.cs 299B

1234567891011121314
  1. using System;
  2. using System.IO;
  3. namespace Teknik.Utilities
  4. {
  5. public static class ByteHelper
  6. {
  7. public static void PadToMultipleOf(ref byte[] src, int pad)
  8. {
  9. int len = (src.Length + pad - 1) / pad * pad;
  10. Array.Resize(ref src, len);
  11. }
  12. }
  13. }