Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(53)  |  Call(44)  |  Derive(0)  |  Import(9)
Decode the given stream

@param stream: Stream to be decoded (string)
@param filter: Filter to apply to decode the stream
@param parameters: List of PDFObjects containing the parameters for the filter
@return: A tuple (status,statusContent), where statusContent is the decoded stream in case status = 0 or an error in case status = -1

        def decodeStream(stream, filter, parameters = {}):
	'''
		Decode the given stream
		
		@param stream: Stream to be decoded (string)
		@param filter: Filter to apply to decode the stream
		@param parameters: List of PDFObjects containing the parameters for the filter
		@return: A tuple (status,statusContent), where statusContent is the decoded stream in case status = 0 or an error in case status = -1
	'''
	if filter == '/ASCIIHexDecode' or filter == 'AHx':
		ret = asciiHexDecode(stream)
	elif filter == '/ASCII85Decode' or filter == 'A85':
		ret = ascii85Decode(stream)
	elif filter == '/LZWDecode' or filter == 'LZW':
		ret = lzwDecode(stream, parameters)
	elif filter == '/FlateDecode' or filter == 'Fl':
		ret = flateDecode(stream, parameters)
	elif filter == '/RunLengthDecode' or filter == 'RL':
		ret = runLengthDecode(stream)
	elif filter == '/CCITTFaxDecode' or filter == 'CCF':
		ret = ccittFaxDecode(stream, parameters)
	elif filter == '/JBIG2Decode':
		ret = jbig2Decode(stream, parameters)
	elif filter == '/DCTDecode' or filter == 'DCT':
		ret = dctDecode(stream, parameters)
	elif filter == '/JPXDecode':
		ret = jpxDecode(stream)
	elif filter == '/Crypt':
		ret = crypt(stream, parameters) 
	return ret
        


src/t/h/thug-HEAD/src/peepdf/PDFCore.py   thug(Download)
from PDFCrypto import *
from JSAnalysis import *
from PDFFilters import decodeStream,encodeStream
 
MAL_ALL = 1
                if filterType == 'name':
                    if self.filterParams == None:
                        ret = decodeStream(self.encodedStream, self.filter.getValue(), self.filterParams)
                        if ret[0] == -1:
                            if self.rawStream != self.encodedStream:
                                ret = decodeStream(self.rawStream, self.filter.getValue(), self.filterParams)
                            self.decodedStream = ret[1]
                    elif filterParamsType == 'dictionary':
                        ret = decodeStream(self.encodedStream, self.filter.getValue(), self.filterParams.getElements())            
                        if ret[0] == -1:
                            if self.rawStream != self.encodedStream:
                                ret = decodeStream(self.rawStream, self.filter.getValue(), self.filterParams.getElements())

src/c/l/classyPDF-HEAD/peepdf_classy/PDFCore.py   classyPDF(Download)
from PDFCrypto import *
from JSAnalysis import *
from PDFFilters import decodeStream,encodeStream
 
MAL_ALL = 1
                if filterType == 'name':
                    if self.filterParams == None:
                        ret = decodeStream(self.encodedStream, self.filter.getValue(), self.filterParams)
                        if ret[0] == -1:
                            if self.rawStream != self.encodedStream:
                                ret = decodeStream(self.rawStream, self.filter.getValue(), self.filterParams)
                            self.decodedStream = ret[1]
                    elif filterParamsType == 'dictionary':
                        ret = decodeStream(self.encodedStream, self.filter.getValue(), self.filterParams.getElements())            
                        if ret[0] == -1:
                            if self.rawStream != self.encodedStream:
                                ret = decodeStream(self.rawStream, self.filter.getValue(), self.filterParams.getElements())

src/c/l/classyPDF-HEAD/peepdf_classy/bsdPDFCore.py   classyPDF(Download)
from PDFCrypto import *
from JSAnalysis import *
from PDFFilters import decodeStream,encodeStream
 
MAL_ALL = 1
                if filterType == 'name':
                    if self.filterParams == None:
                        ret = decodeStream(self.encodedStream, self.filter.getValue(), self.filterParams)
                        if ret[0] == -1:
                            if self.rawStream != self.encodedStream:
                                ret = decodeStream(self.rawStream, self.filter.getValue(), self.filterParams)
                            self.decodedStream = ret[1]
                    elif filterParamsType == 'dictionary':
                        ret = decodeStream(self.encodedStream, self.filter.getValue(), self.filterParams.getElements())            
                        if ret[0] == -1:
                            if self.rawStream != self.encodedStream:
                                ret = decodeStream(self.rawStream, self.filter.getValue(), self.filterParams.getElements())

src/p/d/pdfxray_public-HEAD/apps/peep/PDFCore.py   pdfxray_public(Download)
from PDFCrypto import *
from JSAnalysis import *
from PDFFilters import decodeStream,encodeStream
 
MAL_ALL = 1
                if filterType == 'name':
                    if self.filterParams == None:
                        ret = decodeStream(self.encodedStream, self.filter.getValue(), self.filterParams)
                        if ret[0] == -1:
                            if self.rawStream != self.encodedStream:
                                ret = decodeStream(self.rawStream, self.filter.getValue(), self.filterParams)
                            self.decodedStream = ret[1]
                    elif filterParamsType == 'dictionary':
                        ret = decodeStream(self.encodedStream, self.filter.getValue(), self.filterParams.getElements())            
                        if ret[0] == -1:
                            if self.rawStream != self.encodedStream:
                                ret = decodeStream(self.rawStream, self.filter.getValue(), self.filterParams.getElements())

src/p/d/pdfxray_lite-HEAD/lib/PDFCore.py   pdfxray_lite(Download)
from PDFCrypto import *
from JSAnalysis import *
from PDFFilters import decodeStream,encodeStream
 
MAL_ALL = 1
                if filterType == 'name':
                    if self.filterParams == None:
                        ret = decodeStream(self.encodedStream, self.filter.getValue(), self.filterParams)
                        if ret[0] == -1:
                            if self.rawStream != self.encodedStream:
                                ret = decodeStream(self.rawStream, self.filter.getValue(), self.filterParams)
                            self.decodedStream = ret[1]
                    elif filterParamsType == 'dictionary':
                        ret = decodeStream(self.encodedStream, self.filter.getValue(), self.filterParams.getElements())            
                        if ret[0] == -1:
                            if self.rawStream != self.encodedStream:
                                ret = decodeStream(self.rawStream, self.filter.getValue(), self.filterParams.getElements())

src/t/h/thug-HEAD/src/peepdf/PDFConsole.py   thug(Download)
from PDFCore import *
from base64 import b64encode,b64decode
from PDFFilters import decodeStream,encodeStream
from jjdecode import JJDecoder
 
                    return False
            else:
                ret = decodeStream(decodedContent, realFilter)
                if ret[0] == -1:
                    message = '*** Error: '+ret[1]+'!!'

src/c/l/classyPDF-HEAD/peepdf_classy/PDFConsole.py   classyPDF(Download)
from PDFCore import *
from base64 import b64encode,b64decode
from PDFFilters import decodeStream,encodeStream
try:
    from colorama import init, Fore, Back, Style
                    return False
            else:
                ret = decodeStream(decodedContent, realFilter)
                if ret[0] == -1:
                    message = '*** Error: '+ret[1]+'!!'

src/p/d/pdfxray_public-HEAD/apps/peep/PDFConsole.py   pdfxray_public(Download)
from PDFCore import *
from base64 import b64encode,b64decode
from PDFFilters import decodeStream,encodeStream
try:
    from spidermonkey import Runtime
                    return False
            else:
                ret = decodeStream(decodedContent, realFilter)
                if ret[0] == -1:
                    message = '*** Error: '+ret[1]+'!!'

src/p/d/pdfxray_lite-HEAD/lib/PDFConsole.py   pdfxray_lite(Download)
from PDFCore import *
from base64 import b64encode,b64decode
from PDFFilters import decodeStream,encodeStream
try:
    from spidermonkey import Runtime
                    return False
            else:
                ret = decodeStream(decodedContent, realFilter)
                if ret[0] == -1:
                    message = '*** Error: '+ret[1]+'!!'