Tags: google/go-tika
Tags
tika: implement Parse and Translate methods that return readers (#34) Always reading the response body into memory results in unnecessary and undesired allocations, especially when sending large documents to Tika for parsing. The call method, which is called for all API requests, doesn't copy the response anymore. Instead, callString copies it for the methods that return strings and callUnmarshal does its own buffering using the JSON decoder. This commit also creates a new method, ParseReader, which allows users of the client to omit copying the response, but instead receive its reader directly, which they are responsible to close. As with ParseReader, a TranslateReader is provided for the same reasons.