shithub: pdffs

Download patch

ref: c626c599b018d47759a86629c1474b04480675c6
parent: 6405cc7d102f1593ff912af4db66c5cc8e0277e8
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Sat Apr 10 12:57:02 EDT 2021

add TODO to the readme

--- a/README.md
+++ b/README.md
@@ -5,3 +5,10 @@
 There is nothing to look at yet.  You can build it and run things like
 `./6.out my.pdf Root Pages Kids 0 Kids 0 Kids 0 Contents .` to dump a
 specific object (text, images, fonts, etc).
+
+## TODO
+
+* ASCIIHexDecode filter
+* CryptDecode filter
+* does DCTDecode filter need to deal with ColorTransform?
+* do we need predictor 5 ("optimum")?
--- a/f_ascii85.c
+++ b/f_ascii85.c
@@ -2,6 +2,8 @@
 #include <libc.h>
 #include "pdf.h"
 
+/* 7.4.3 ASCII85Decode filter */
+
 static int
 flreadall(void *aux, Buffer *bi, Buffer *bo)
 {
--- a/f_asciihex.c
+++ b/f_asciihex.c
@@ -2,6 +2,8 @@
 #include <libc.h>
 #include "pdf.h"
 
+/* 7.4.2 ASCIIHexDecode filter */
+
 Filter filterASCIIHex = {
 	.name = "ASCIIHexDecode",
 };
--- a/f_crypt.c
+++ b/f_crypt.c
@@ -2,6 +2,8 @@
 #include <libc.h>
 #include "pdf.h"
 
+/* 7.4.10 CryptDecode filter */
+
 Filter filterCrypt = {
 	.name = "CryptDecode",
 };
--- a/f_dct.c
+++ b/f_dct.c
@@ -2,10 +2,14 @@
 #include <libc.h>
 #include "pdf.h"
 
+/* 7.4.8 DCTDecode filter */
+
 static int
 flreadall(void *aux, Buffer *bi, Buffer *bo)
 {
 	USED(aux);
+
+	/* FIXME not doing anything about ColorTransform here? */
 
 	bufput(bo, bi->b, bi->sz);
 	bi->off = bi->sz;
--- a/f_flate.c
+++ b/f_flate.c
@@ -3,6 +3,8 @@
 #include <flate.h>
 #include "pdf.h"
 
+/* 7.4.4 FlateDecode filter */
+
 static int
 bw(void *aux, void *d, int n)
 {
--- a/f_jpx.c
+++ b/f_jpx.c
@@ -2,6 +2,8 @@
 #include <libc.h>
 #include "pdf.h"
 
+/* 7.4.9 JPXDecode filter */
+
 static int
 flreadall(void *aux, Buffer *bi, Buffer *bo)
 {
--- a/f_lzw.c
+++ b/f_lzw.c
@@ -2,6 +2,8 @@
 #include <libc.h>
 #include "pdf.h"
 
+/* 7.4.4 LZWDecode filter */
+
 typedef struct Pt Pt;
 typedef struct Tb Tb;