+
+/*
+ * Reads the alternate data stream entries for a dentry.
+ *
+ * @p: Pointer to buffer that starts with the first alternate stream entry.
+ *
+ * @dentry: Dentry to load the alternate data streams into.
+ * @dentry->num_ads must have been set to the number of
+ * alternate data streams that are expected.
+ *
+ * @remaining_size: Number of bytes of data remaining in the buffer pointed
+ * to by @p.
+ *
+ * The format of the on-disk alternate stream entries is as follows:
+ *
+ * struct ads_entry_on_disk {
+ * u64 length; // Length of the entry, in bytes. This includes
+ * all fields (including the stream name and
+ * null terminator if present, AND the padding!).
+ * u64 reserved; // Seems to be unused
+ * u8 hash[20]; // SHA1 message digest of the uncompressed stream
+ * u16 stream_name_len; // Length of the stream name, in bytes
+ * char stream_name[]; // Stream name in UTF-16LE, @stream_name_len bytes long,
+ * not including null terminator
+ * u16 zero; // UTF-16 null terminator for the stream name, NOT
+ * included in @stream_name_len. Based on what
+ * I've observed from filenames in dentries,
+ * this field should not exist when
+ * (@stream_name_len == 0), but you can't
+ * actually tell because of the padding anyway
+ * (provided that the padding is zeroed, which
+ * it always seems to be).
+ * char padding[]; // Padding to make the size a multiple of 8 bytes.
+ * };
+ *
+ * In addition, the entries are 8-byte aligned.
+ *
+ * Return 0 on success or nonzero on failure. On success, dentry->ads_entries
+ * is set to an array of `struct ads_entry's of length dentry->num_ads. On
+ * failure, @dentry is not modified.
+ */