xref: /aosp_15_r20/external/zstd/contrib/pzstd/main.cpp (revision 01826a4963a0d8a59bc3812d29bdf0fb76416722)
1*01826a49SYabin Cui /*
2*01826a49SYabin Cui  * Copyright (c) Meta Platforms, Inc. and affiliates.
3*01826a49SYabin Cui  * All rights reserved.
4*01826a49SYabin Cui  *
5*01826a49SYabin Cui  * This source code is licensed under both the BSD-style license (found in the
6*01826a49SYabin Cui  * LICENSE file in the root directory of this source tree) and the GPLv2 (found
7*01826a49SYabin Cui  * in the COPYING file in the root directory of this source tree).
8*01826a49SYabin Cui  */
9*01826a49SYabin Cui #include "ErrorHolder.h"
10*01826a49SYabin Cui #include "Options.h"
11*01826a49SYabin Cui #include "Pzstd.h"
12*01826a49SYabin Cui 
13*01826a49SYabin Cui using namespace pzstd;
14*01826a49SYabin Cui 
main(int argc,const char ** argv)15*01826a49SYabin Cui int main(int argc, const char** argv) {
16*01826a49SYabin Cui   Options options;
17*01826a49SYabin Cui   switch (options.parse(argc, argv)) {
18*01826a49SYabin Cui   case Options::Status::Failure:
19*01826a49SYabin Cui     return 1;
20*01826a49SYabin Cui   case Options::Status::Message:
21*01826a49SYabin Cui     return 0;
22*01826a49SYabin Cui   default:
23*01826a49SYabin Cui     break;
24*01826a49SYabin Cui   }
25*01826a49SYabin Cui 
26*01826a49SYabin Cui   return pzstdMain(options);
27*01826a49SYabin Cui }
28