xz.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // Copyright (C) 2016 The Android Open Source Project
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. //
  16. #ifndef UPDATE_ENGINE_PAYLOAD_GENERATOR_XZ_H_
  17. #define UPDATE_ENGINE_PAYLOAD_GENERATOR_XZ_H_
  18. #include <brillo/secure_blob.h>
  19. namespace chromeos_update_engine {
  20. // Initialize the xz compression unit. Call once before any call to
  21. // XzCompress().
  22. void XzCompressInit();
  23. // Compresses the input buffer |in| into |out| with xz. The compressed stream
  24. // will be the equivalent of running xz -9 --check=none
  25. bool XzCompress(const brillo::Blob& in, brillo::Blob* out);
  26. } // namespace chromeos_update_engine
  27. #endif // UPDATE_ENGINE_PAYLOAD_GENERATOR_XZ_H_