Skip to content

Conversation

@srudakov
Copy link

Now there is decoding from memory(not files) function in reconstruct. Maybe it would be better to use existing streams system(IOStream with m_lUserData, m_pUserBuffer, etc.), but i wasn't sure if it works properly and if it is right to use it that way. So i made abstract HookDataAccessor with two implementatios(for files and for arrays) and using them where files were used. I need decoding, so for now it's not possible to encode from memory.

Second feature made is possibility to decode into raw format instead of ppm.

Рудаков Сергей Андреевич and others added 2 commits November 15, 2016 17:46
@thorfdbg
Copy link
Owner

Am 15.11.2016 um 17:53 schrieb srudakov:

Now there is decoding from memory(not files) function in reconstruct.
Maybe it would be better to use existing streams system(IOStream with
m_lUserData, m_pUserBuffer, etc.), but i wasn't sure if it works
properly and if it is right to use it that way.

The proper way of doing this is to implement an IOHook that reads from
its private buffer instead of a file. Actually, this is outside of the
core library, but rather a matter of the implementation of a proper
IOHook. You find an implementation of the IOHook in cmd/filehook.hpp, but
this is only an example code and not part of the inner working of the code.

So i made abstract HookDataAccessor with two implementatios(for files
and for arrays) and using them where files were used. I need decoding,
so for now it's not possible to encode from memory.

Second feature made is possibility to decode into raw format instead
of ppm.

This is also only a matter of the external interface. Everything you
find in "cmd" is just a demo front-end for the code, not part of the
actual core-code, and it is really up to the user of the library to
implement the alternatives that are most appropriate for the desired use
case.

Greetings,
Thomas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants