Skip to content

Reading files from a pointer #178

Description

@Raffaello

At the moment is only possible to read a file type from a filename.

Audio files might be packed in file like WAD or similar.

To read from those needs to read them from an already positioned file pointer or having read it all in a memory buffer before decoding it.


It is required to add the read a file type within a file container, like a WAD/PAK or whatever using either a "parent file pointer" or a memory buffer and add these methods as a constructor.

It requires to refactor all files types with this functionality.

So to pass a file pointer already positioned at the starting point of the internal file to be read could be done using the parent class File.


As a library when integrating with some other File I/O ops, for example reading a WAD, it is not really efficient to read the WAD and create a File class pointer to pass to the method to be read, but the read it from memory buffer could be the right alternative.

This bring a consideration that other constructors could be implemented instead of using parent class File:
It could use FILE* or fstream types for eg.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfileI/O file related

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions