Merge branches 'dev' and 'dev' of https://grond.iut-fbleau.fr/dialloa/SAE32_2025 into dev

This commit is contained in:
AlgaLaptop
2026-01-04 18:13:25 +01:00
29 changed files with 1826 additions and 1551 deletions
+23 -23
View File
@@ -1,23 +1,23 @@
package fr.iutfbleau.sae.mpif;
public class DecodeNode {
public DecodeNode left;
public DecodeNode right;
public Integer value; // null si pas une feuille
public DecodeNode() {
this.left = null;
this.right = null;
this.value = null;
}
public DecodeNode(DecodeNode left, DecodeNode right, Integer value) {
this.left = left;
this.right = right;
this.value = value;
}
public boolean isLeaf() {
return this.left == null && this.right == null;
}
}
package fr.iutfbleau.sae.mpif;
public class DecodeNode {
public DecodeNode left;
public DecodeNode right;
public Integer value; // null si pas une feuille
public DecodeNode() {
this.left = null;
this.right = null;
this.value = null;
}
public DecodeNode(DecodeNode left, DecodeNode right, Integer value) {
this.left = left;
this.right = right;
this.value = value;
}
public boolean isLeaf() {
return this.left == null && this.right == null;
}
}
+18 -2
View File
@@ -44,11 +44,27 @@ public class PIFReader {
public void readHeader(BitInputStream in) {
// La largeur et l'hauteur de l'image occupe chaqun deux octets soit 16 bits :
this.width = in.readBits(16);
this.height = in.readBits(16);
}
public void readCanonicalTables(BitInputStream in) {
// TODO: Implement canonical table reading
}
this.lenR = new int[256];
this.lenG = new int[256];
this.lenB = new int[256];
for (int i = 0; i < 256; i++){
lenR[i] = in.readBits(8);
}
for (int j = 0; j < 256; j++){
lenG[j] = in.readBits(8);
}
for (int k = 0; k < 256; k++){
lenB[k] = in.readBits(8);
}
}
public Map<String,Integer> rebuildCanonical(int[] lengths) {
// TODO: Implement canonical table reconstruction