Yann Collet | e9dc204 | 2017-08-31 11:24:54 -0700 | [diff] [blame] | 1 | /* |
Elliott Hughes | 44aba64 | 2023-09-12 20:18:59 +0000 | [diff] [blame] | 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
Nick Terrell | c932520 | 2016-09-01 15:22:19 -0700 | [diff] [blame] | 3 | * All rights reserved. |
| 4 | * |
Yann Collet | e9dc204 | 2017-08-31 11:24:54 -0700 | [diff] [blame] | 5 | * This source code is licensed under both the BSD-style license (found in the |
| 6 | * LICENSE file in the root directory of this source tree) and the GPLv2 (found |
| 7 | * in the COPYING file in the root directory of this source tree). |
Nick Terrell | c932520 | 2016-09-01 15:22:19 -0700 | [diff] [blame] | 8 | */ |
| 9 | #include "ErrorHolder.h" |
| 10 | #include "Options.h" |
| 11 | #include "Pzstd.h" |
Nick Terrell | c932520 | 2016-09-01 15:22:19 -0700 | [diff] [blame] | 12 | |
| 13 | using namespace pzstd; |
| 14 | |
| 15 | int main(int argc, const char** argv) { |
| 16 | Options options; |
Nick Terrell | 254c5b1 | 2016-09-21 14:29:47 -0700 | [diff] [blame] | 17 | switch (options.parse(argc, argv)) { |
| 18 | case Options::Status::Failure: |
Nick Terrell | c932520 | 2016-09-01 15:22:19 -0700 | [diff] [blame] | 19 | return 1; |
Nick Terrell | 254c5b1 | 2016-09-21 14:29:47 -0700 | [diff] [blame] | 20 | case Options::Status::Message: |
| 21 | return 0; |
| 22 | default: |
| 23 | break; |
Nick Terrell | c932520 | 2016-09-01 15:22:19 -0700 | [diff] [blame] | 24 | } |
| 25 | |
Nick Terrell | 254c5b1 | 2016-09-21 14:29:47 -0700 | [diff] [blame] | 26 | return pzstdMain(options); |
Nick Terrell | c932520 | 2016-09-01 15:22:19 -0700 | [diff] [blame] | 27 | } |