1# astc-codec 2 3astc-codec is a software ASTC decoder implementation, which supports the ASTC 4LDR profile. 5 6Example usage: 7 8``` 9#include <astc-codec/astc-codec.h> 10 11// ... 12 13std::vector<uint8_t> astc = LoadMyASTCData(); 14const size_t width = 640; 15const size_t height = 480; 16 17std::vector<uint8_t> result; 18result.resize(width * height * 4); 19 20bool success = astc_codec::ASTCDecompressToRGBA( 21 astc.data(), astc.size(), width, height, astc_codec::FootprintType::k4x4, 22 result.data(), result.size(), /* stride */ width * 4); 23``` 24 25## Building 26 27### With bazel 28 29Install [Bazel](https://bazel.build/), and then run: 30 31``` 32bazel build :astc_codec -c opt 33``` 34 35astc-codec has been tested on Mac and Linux. 36 37### Run Tests 38 39``` 40bazel test //... 41``` 42 43### With CMake 44 45Install [CMake](https://cmake.org/), and the run: 46 47``` 48mkdir build && cd build && cmake .. && make 49``` 50 51Or open the project in your favorite IDE and import CMakeLists.txt. 52 53### Run Tests 54 55In the build directory, execute: 56 57``` 58ctest 59``` 60 61 62## Contributing 63 64See [CONTRIBUTING.md](CONTRIBUTING.md) for important contributing requirements. 65 66## License 67 68astc-codec project is licensed under the Apache License Version 2.0. You can 69find a copy of it in [LICENSE](LICENSE). 70 71This is not an officially supported Google product. 72