-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Partial/incremental decompression of clusters #411
Changes from all commits
3dc7700
eed7ade
ff249c7
d344009
9c46d28
56505a5
eaf0aed
a9f2fde
34c1326
757cd27
ac857be
1c2a7b9
1ac51bd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
* Copyright (C) 2020 Veloman Yunkan | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License as | ||
* published by the Free Software Foundation; either version 2 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* is provided AS IS, WITHOUT ANY WARRANTY; without even the implied | ||
* warranty of MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, and | ||
* NON-INFRINGEMENT. See the GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
* | ||
*/ | ||
|
||
#ifndef ZIM_BUFDATASTREAM_H | ||
#define ZIM_BUFDATASTREAM_H | ||
|
||
#include "idatastream.h" | ||
#include "debug.h" | ||
|
||
#include <string.h> | ||
|
||
namespace zim | ||
{ | ||
|
||
class BufDataStream : public IDataStream | ||
{ | ||
public: // functions | ||
explicit BufDataStream(const char* data, size_t size) | ||
: data_(data) | ||
, size_(size) | ||
{} | ||
|
||
protected: | ||
void readImpl(void* buf, size_t nbytes) override; | ||
Blob readBlobImpl(size_t size) override; | ||
|
||
|
||
private: // data | ||
const char* data_; | ||
size_t size_; | ||
Comment on lines
+45
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not use a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have wicked plans of getting rid of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please stop wicked plans :) Let's talk together before. |
||
}; | ||
|
||
} // namespace zim | ||
|
||
#endif // ZIM_BUFDATASTREAM_H |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class seems never used at all (except in test).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. I thought it was used in an intermediate state but it only enables unit-testing
DecodedDataStream
.