]> wimlib.net Git - wimlib/blobdiff - src/lz_sarray.c
wimlib_extract_paths(): Canonicalize WIM paths before using them
[wimlib] / src / lz_sarray.c
index ffffcd1688bb789a355e6fec09cac1b394e2f7a0..881c3c6c15718abd86df6888e51881e193c2ebbf 100644 (file)
@@ -94,10 +94,10 @@ compute_inverse_suffix_array(input_idx_t ISA[restrict],
                             const input_idx_t SA[restrict],
                             input_idx_t n)
 {
-       input_idx_t i;
+       input_idx_t r;
 
-       for (i = 0; i < n; i++)
-               ISA[SA[i]] = i;
+       for (r = 0; r < n; r++)
+               ISA[SA[r]] = r;
 }
 
 
@@ -377,6 +377,12 @@ lz_sarray_init(struct lz_sarray *mf,
        return true;
 }
 
+u64
+lz_sarray_get_needed_memory(input_idx_t max_window_size)
+{
+       return (u64)6 * sizeof(input_idx_t) * max_window_size;
+}
+
 /*
  * Prepare the suffix array match-finder to scan the specified window for
  * matches.