Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an open_memstream compatiblity layer #61

Open
rhdunn opened this issue Jun 24, 2014 · 0 comments
Open

Create an open_memstream compatiblity layer #61

rhdunn opened this issue Jun 24, 2014 · 0 comments
Labels

Comments

@rhdunn
Copy link
Owner

rhdunn commented Jun 24, 2014

On systems that do not support open_memstream a temporary file is created. While this works, it is slower than using the in-memory version.

BSD-based systems (including Android and Mac OS) have funopen that allows creating custom FILE objects. There are various open_memstream compatibility layers available, e.g.:

  1. https://code.google.com/p/tesseract-android-tools/source/browse/tesseract-android-tools/jni/com_googlecode_leptonica_android/stdio/open_memstream.c?r=f5c859a3bd7cd1e1efba38050fb6b79244971df9
  2. https://github.com/shyuep/pyhull/tree/master/src/fmemopen

Adapting one of these will allow in-memory file stream support on more platforms (i.e. everything other than Windows).

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/2796597-create-an-open_memstream-compatiblity-layer?utm_campaign=plugin&utm_content=tracker%2F254961&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F254961&utm_medium=issues&utm_source=github).
@rhdunn rhdunn added the roadmap label Jun 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant