MCPcopy Index your code
hub / github.com/google/brotli / push

Method push

java/org/brotli/wrapper/enc/EncoderJNI.java:108–124  ·  view source on GitHub ↗
(Operation op, int length)

Source from the content-addressed store, hash-verified

106 }
107
108 void push(Operation op, int length) {
109 if (length < 0) {
110 throw new IllegalArgumentException("negative block length");
111 }
112 if (context[0] == 0) {
113 throw new IllegalStateException("brotli encoder is already destroyed");
114 }
115 if (!isSuccess() || hasMoreOutput()) {
116 throw new IllegalStateException("pushing input to encoder in unexpected state");
117 }
118 if (hasRemainingInput() && length != 0) {
119 throw new IllegalStateException("pushing input to encoder over previous input");
120 }
121 context[1] = op.ordinal();
122 fresh = false;
123 nativePush(context, length);
124 }
125
126 boolean isSuccess() {
127 return context[1] != 0;

Callers 2

compressMethod · 0.95
encodeMethod · 0.45

Calls 4

isSuccessMethod · 0.95
hasMoreOutputMethod · 0.95
hasRemainingInputMethod · 0.95
nativePushMethod · 0.45

Tested by

no test coverage detected