Skip to content

Change VHD implementation to return stream on .open() instead of being a stream #56

@Schamper

Description

@Schamper

Currently most disk/volume implementations in Dissect have the parsing and the stream reading in the same class. This can cause unintended/unexpected side-effects in various Dissect streams. In an effort to minimize that, we want to change implementations to create a separate stream only when requested.

Basically, going from this:

SomeDisk(fh).read(512)

To this:

some = SomeDisk(fh)
some.open().read(512)

class VHD(AlignedStream):

Needed towards fox-it/dissect.target#100

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions