blob: 422b4a56a7103b77dde1f960ed68e95869b2f8d1 [file] [log] [blame]
Yann Collete9dc2042017-08-31 11:24:54 -07001/*
Elliott Hughes44aba642023-09-12 20:18:59 +00002 * Copyright (c) Meta Platforms, Inc. and affiliates.
Nick Terrellc9325202016-09-01 15:22:19 -07003 * All rights reserved.
4 *
Yann Collete9dc2042017-08-31 11:24:54 -07005 * 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 Terrellc9325202016-09-01 15:22:19 -07008 */
9#include "ErrorHolder.h"
10#include "Options.h"
11#include "Pzstd.h"
Nick Terrellc9325202016-09-01 15:22:19 -070012
13using namespace pzstd;
14
15int main(int argc, const char** argv) {
16 Options options;
Nick Terrell254c5b12016-09-21 14:29:47 -070017 switch (options.parse(argc, argv)) {
18 case Options::Status::Failure:
Nick Terrellc9325202016-09-01 15:22:19 -070019 return 1;
Nick Terrell254c5b12016-09-21 14:29:47 -070020 case Options::Status::Message:
21 return 0;
22 default:
23 break;
Nick Terrellc9325202016-09-01 15:22:19 -070024 }
25
Nick Terrell254c5b12016-09-21 14:29:47 -070026 return pzstdMain(options);
Nick Terrellc9325202016-09-01 15:22:19 -070027}