libopenraw
unpack.h
1 /*
2  * libopenraw - unpack.cpp
3  *
4  * Copyright (C) 2008 Hubert Figuiere
5  * Copyright (C) 2008 Novell, Inc.
6  *
7  * This library is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * as published by the Free Software Foundation, either version 3 of
10  * the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library. If not, see
19  * <http://www.gnu.org/licenses/>.
20  */
21 
22 
23 #ifndef __UNPACK_H__
24 #define __UNPACK_H__
25 
26 #include <stdint.h>
27 #include <stddef.h>
28 
29 #include <boost/noncopyable.hpp>
30 
31 namespace OpenRaw { namespace Internals {
32 
34  class Unpack
35  : public boost::noncopyable
36  {
37  public:
38  Unpack(uint32_t w, uint32_t t);
39 
40  size_t block_size();
41  size_t unpack_be12to16(uint8_t *dest, const uint8_t *src, size_t size);
42  private:
43  uint32_t m_w;
44  uint32_t m_type;
45  };
46 
47 } }
48 
49 #endif