with Interfaces;

use Interfaces;

package FILO is

   type Blockdev_Length is range 0 .. Interfaces.Unsigned_64'Last;
   subtype Blockdev_Offset is Blockdev_Length range 0 .. Blockdev_Length'Last - 1;
   subtype Partition_Length is Blockdev_Length;
   subtype Partition_Offset is Blockdev_Offset;

   BLOCK_SIZE : constant := 512;
   type Block_Offset is range 0 .. Partition_Offset'Last / BLOCK_SIZE;

   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 FILO;
