wxMaxima
Loading...
Searching...
No Matches
variable_length.h
1/* Copyright 2015 Google Inc. All Rights Reserved.
2
3 Distributed under MIT license.
4 See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
5*/
6
7/* Helper functions for woff2 variable length types: 255UInt16 and UIntBase128 */
8
9#ifndef WOFF2_VARIABLE_LENGTH_H_
10#define WOFF2_VARIABLE_LENGTH_H_
11
12#include <inttypes.h>
13#include <vector>
14#include "./buffer.h"
15
16namespace woff2 {
17
18size_t Size255UShort(uint16_t value);
19bool Read255UShort(Buffer* buf, unsigned int* value);
20void Write255UShort(std::vector<uint8_t>* out, int value);
21void Store255UShort(int val, size_t* offset, uint8_t* dst);
22
23size_t Base128Size(size_t n);
24bool ReadBase128(Buffer* buf, uint32_t* value);
25void StoreBase128(size_t len, size_t* offset, uint8_t* dst);
26
27} // namespace woff2
28
29#endif // WOFF2_VARIABLE_LENGTH_H_
30