Fat_sector_mapInstances of SectorMap will map virtual sectors within a file to physical sector numbers on disk
val make : int list -> ttype byte_range = int * t * intA range of bytes represented by a preceeding, t, succeeding where t represents a sequence of sectors, preceeding is the number of unnecessary bytes in the first sector and succeeding is the number of unnecessary bytes in the last sector.
val byte_range : int -> int -> int -> byte_rangebyte_range bytes_per_sector byte_start byte_len returns preceeding_bytes, t, succeeding_bytes where t is the identity map for all sectors in the range floor(byte_start/bytes_per_sector) to ceiling((byte_start + byte_len)/bytes_per_sector. preceeding_bytes is the number of bytes before byte_start in the first sector; succeeding_bytes is the number of bytes affter byte_start+byte_len in the last sector.
val clip : byte_range -> Cstruct.t list -> Cstruct.t listclip byte_range sectors removes unnecessary bytes from sectors
compose a b returns (x, y) for all x\in domain(a) where ax,y \in b In particular if we want to read an object in a file represented by a, and b represents the mapping of virtual sector in the file to physical sector on the disk, then compose a b represents the physical sectors of the object on the disk.
val to_list : t -> int listto_list t returns the values of t, ordered by keys
val to_string : t -> stringto_string t returns a printable version of t
val find : t -> int -> intfind x sector returns the physical address on disk corresponding to the virtual sector sector according to SectorMap x
val transform_offset : t -> int -> int64 -> int64transform_offset x sector_size vaddr returns the physical address on disk corresponding to virtual address vaddr according to SectorMap x