• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * PowerPCOptions
3  *
4  * Author: Lasse Collin <lasse.collin@tukaani.org>
5  *
6  * This file has been put into the public domain.
7  * You can do whatever you want with this file.
8  */
9 
10 package org.tukaani.xz;
11 
12 import java.io.InputStream;
13 import org.tukaani.xz.simple.PowerPC;
14 
15 /**
16  * BCJ filter for big endian PowerPC instructions.
17  */
18 public class PowerPCOptions extends BCJOptions {
19     private static final int ALIGNMENT = 4;
20 
PowerPCOptions()21     public PowerPCOptions() {
22         super(ALIGNMENT);
23     }
24 
getOutputStream(FinishableOutputStream out)25     public FinishableOutputStream getOutputStream(FinishableOutputStream out) {
26         return new SimpleOutputStream(out, new PowerPC(true, startOffset));
27     }
28 
getInputStream(InputStream in)29     public InputStream getInputStream(InputStream in) {
30         return new SimpleInputStream(in, new PowerPC(false, startOffset));
31     }
32 
getFilterEncoder()33     FilterEncoder getFilterEncoder() {
34         return new BCJEncoder(this, BCJCoder.POWERPC_FILTER_ID);
35     }
36 }
37