Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BaseJpegDecode Terminal BaseUsbHost mbed mbed-rtos
Fork of BaseJpegDecode by
BitPattern.h@1:58dfd5386a92, 2012-10-08 (annotated)
- Committer:
- va009039
- Date:
- Mon Oct 08 11:38:57 2012 +0000
- Revision:
- 1:58dfd5386a92
- Parent:
- 0:7121d9fb45f4
add HuffmanDecode::Lookup2()
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| va009039 | 0:7121d9fb45f4 | 1 | #ifndef BIT_PATTERN_H |
| va009039 | 0:7121d9fb45f4 | 2 | #define BIT_PATTERN_H |
| va009039 | 0:7121d9fb45f4 | 3 | #include "mbed.h" |
| va009039 | 0:7121d9fb45f4 | 4 | |
| va009039 | 0:7121d9fb45f4 | 5 | class BitPattern { |
| va009039 | 0:7121d9fb45f4 | 6 | public: |
| va009039 | 0:7121d9fb45f4 | 7 | BitPattern(); |
| va009039 | 0:7121d9fb45f4 | 8 | BitPattern(uint32_t value, int size); |
| va009039 | 0:7121d9fb45f4 | 9 | BitPattern(const char* s); |
| va009039 | 0:7121d9fb45f4 | 10 | void clear(); |
| va009039 | 0:7121d9fb45f4 | 11 | void operator +=(uint8_t c); |
| va009039 | 0:7121d9fb45f4 | 12 | int operator [](int index); |
| va009039 | 0:7121d9fb45f4 | 13 | void put(uint32_t value, int size = 8); |
| va009039 | 0:7121d9fb45f4 | 14 | uint32_t peek(int size = 8); |
| va009039 | 0:7121d9fb45f4 | 15 | uint32_t get(int size = 8); |
| va009039 | 0:7121d9fb45f4 | 16 | int size(); |
| va009039 | 0:7121d9fb45f4 | 17 | bool match(BitPattern& b); |
| va009039 | 0:7121d9fb45f4 | 18 | bool match(const char* s); |
| va009039 | 0:7121d9fb45f4 | 19 | void operator =(const char* s); |
| va009039 | 0:7121d9fb45f4 | 20 | void operator +=(const char* s); |
| va009039 | 0:7121d9fb45f4 | 21 | bool operator ==(BitPattern& b); |
| va009039 | 0:7121d9fb45f4 | 22 | private: |
| va009039 | 0:7121d9fb45f4 | 23 | uint32_t m_pat; |
| va009039 | 0:7121d9fb45f4 | 24 | int m_size; |
| va009039 | 0:7121d9fb45f4 | 25 | }; |
| va009039 | 0:7121d9fb45f4 | 26 | #endif // BIT_PATTERN_H |
