|
1 | 1 | # tersedecompress |
2 | | -TerseDecompress is a java program that can be used to decompress files which have been previously compressed on an IBM Mainframe using the TERSE / AMATERSE program (on IBM z/OS or IBM z/VM). |
3 | | - |
4 | | - |
5 | | - |
6 | | -Description: |
7 | | - |
8 | | -============ |
9 | 2 |
|
10 | 3 | TerseDecompress is a java program that can be used to decompress files |
11 | | - |
12 | 4 | which have been previously compressed on an IBM Mainframe |
13 | | - |
14 | 5 | using the TERSE / AMATERSE program (on IBM z/OS or IBM z/VM). |
15 | 6 |
|
16 | | -Purpose & benefit: |
17 | | - |
18 | | -================== |
| 7 | +## Purpose & benefit ## |
19 | 8 |
|
20 | 9 | As java programs can virtually run on any platform / operating system |
21 | | - |
22 | 10 | with a JVM, this java decompression program can be very useful if you |
23 | | - |
24 | 11 | don't have access to an IBM mainframe but need to analyze or process a |
25 | | - |
26 | 12 | file which had been compressed on a IBM mainframe using TERSE on IBM z/OS. |
27 | | - |
28 | 13 | With this java version of TerseDecompress, you can decompress those tersed |
29 | | - |
30 | 14 | IBM Mainframe files on any workstation or laptop etc. that supports Java. |
31 | 15 |
|
32 | | -How to run it: |
| 16 | +## Updates ## |
33 | 17 |
|
34 | | -============== |
| 18 | +**Version 5: March 2021** |
35 | 19 |
|
36 | | -TerseDecompress will uncompress a file that was compressed using the TERSE |
| 20 | +- Support for variable length binary records. Variable length records processed in binary mode will be prefixed with a 4 byte field in the same format as the IBM RDW i.e. 2 byte record length field (including RDW length, big-endian) followed by 2 bytes of zeros. |
37 | 21 |
|
38 | | -program on IBM z/OS. |
| 22 | +## How to run it ## |
39 | 23 |
|
40 | | -For execution, TerseDecompress needs a JVM runtime environment |
| 24 | +For execution, TerseDecompress needs a JVM runtime environment. |
41 | 25 |
|
42 | | -Usage: "TerseDecompress [-b]" |
| 26 | +Usage: |
43 | 27 |
|
44 | | - Default mode is text mode, which will attempt ebcdic -> ASCII conversion |
| 28 | +```java -jar tersedecompress-5.0.0.jar [-b] tersed-file output-file``` |
45 | 29 |
|
46 | | - The -b flag turns on binary mode, no conversion will be attempted |
| 30 | +Default mode is text mode, which will attempt EBCDIC -> ASCII conversion. |
47 | 31 |
|
48 | | -How to build it: |
| 32 | +The **-b** flag turns on binary mode, no conversion will be attempted. |
49 | 33 |
|
50 | | -================ |
| 34 | +**Recommendation:** Use binary mode if possible. EBCDIC->ASCII conversion is not a lossless process, unless the data strictly contains only characters that are common to both code pages used for the translation, **and** the original data does not contain line ending characters. |
51 | 35 |
|
52 | | -For compiling the java source code, a JDK is required |
| 36 | +## How to build it ## |
53 | 37 |
|
54 | | -Build command: "javac TerseDecompress.java" |
| 38 | +To build tersedecompress you need the Java JDK and Apache Maven. |
55 | 39 |
|
56 | | -How to report problems and get support/help: |
| 40 | +In the project directory (the directory containing **pom.xml**): |
57 | 41 |
|
58 | | -============================================ |
| 42 | +```mvn clean package``` |
59 | 43 |
|
60 | | -If you have a problem / need help with TerseDecompress.java, please create a GitHub issue. |
| 44 | +## Unit Tests ## |
| 45 | + |
| 46 | +The project contains unit tests to verify that the decompression is correct. |
| 47 | + |
| 48 | +Due to the size of the test data, it is stored in a separate git repository and referenced via a submodule. The test data is not required to build tersedecompress, unless you want to run the unit tests. |
| 49 | + |
| 50 | +The test data can be found here: |
| 51 | +[https://github.com/openmainframeproject/tersedecompress-testdata](https://github.com/openmainframeproject/tersedecompress-testdata) |
| 52 | + |
| 53 | +Descriptions of the data are here: |
| 54 | +[https://github.com/openmainframeproject/tersedecompress-testdata/tree/master/tests](https://github.com/openmainframeproject/tersedecompress-testdata/tree/master/tests) |
61 | 55 |
|
62 | | -You can also send an email to: [email protected] or contact us on Slack at https://slack.openmainframeproject.org channel #tersedecompress |
63 | 56 |
|
64 | | -Please do not send code changes, but explain in a mail |
| 57 | +### Building with Unit Tests ### |
| 58 | + |
| 59 | +1. Initialize (download) the submodule containing the test data: |
| 60 | +```git submodule update --init``` |
| 61 | +2. Build with unit tests: |
| 62 | +```mvn -DskipTests=false clean package``` |
| 63 | + |
| 64 | +## How to report problems and get support/help ## |
| 65 | + |
| 66 | +If you have a problem / need help with TerseDecompress.java, please create a GitHub issue. |
| 67 | + |
| 68 | +There is also a Slack channel: [https://slack.openmainframeproject.org](https://slack.openmainframeproject.org) channel #tersedecompress |
65 | 69 |
|
66 | | -what you want TerseDecompress to do. |
|
0 commit comments