with Interfaces;

use Interfaces;

package FS is

   subtype Index_Type is Natural range 0 .. Natural'Last - 1;
   subtype Index_Type16 is Index_Type range 0 .. Index_Type'Last - 1;
   subtype Index_Type32 is Index_Type16 range 0 .. Index_Type16'Last - 2;

   type Buffer_Type is array (Index_Type range <>) of Unsigned_8;

   function Read_LE16 (Buf : Buffer_Type; Off : Index_Type16) return Unsigned_16
   is
     (Shift_Left (Unsigned_16 (Buf (Off + 1)), 8) or Unsigned_16 (Buf (Off)))
   with
      Pre => Buf'First <= Off and Off + 1 <= Buf'Last;

   function Read_LE32 (Buf : Buffer_Type; Off : Index_Type32) return Unsigned_32
   is
     (Shift_Left (Unsigned_32 (Buf (Off + 3)), 24) or
      Shift_Left (Unsigned_32 (Buf (Off + 2)), 16) or
      Shift_Left (Unsigned_32 (Buf (Off + 1)),  8) or
      Unsigned_32 (Buf (Off)))
   with
      Pre => Buf'First <= Off and Off + 3 <= Buf'Last;

end FS;
